Help on cell formatting

  • Thread starter Thread starter Valeria
  • Start date Start date
V

Valeria

Dear experts,
I have a procedure to insert a comment in some cells on a
worksheet.
Now, the comment text is made of a fixed text part and of
a cell value from another workbook:
Workbooks(a).Worksheets(1).Cells(i, z).AddComment "Price
is " & Workbooks(External).Worksheets(1).Cells(f, g)

My problem is that I would like to get a 2-decimal number
from the external workbook for the comment(I am getting
many more decimals!), without actually changing the cell
in the external workbook.
Can somebody please help me?
Many thanks.
Kind regards,
Valeria
 
Hi Valeria,

you may try

Workbooks(a).Worksheets(1).Cells(i, z).AddComment "Price
is " & format(Workbooks(External).Worksheets(1).Cells(f,
g), "0.00")
(untested)

Best regards

Wolf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top