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
 
Back
Top