ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Format Returned Values in VBA Q (https://www.excelbanter.com/excel-programming/438737-format-returned-values-vba-q.html)

Seanie

Format Returned Values in VBA Q
 
The code below returns for me the values in Cells E6 & B62, but the
value in B62 is 18.87% but what is returned for me on my code is
0.1847547857. How can I format what is returned as **.**%?


ThisWorkbook.Sheets("Master").Range("E6") & " " & ThisWorkbook.Sheets
("Report").Range("B62") & vbNewLine & _


Rick Rothstein

Format Returned Values in VBA Q
 
When you use Range(xx) without specifying a property, the Value property is
assumed. Try using the Text property instead...

ThisWorkbook.Sheets("Master").Range("E6").Text & " " & ThisWorkbook.Sheets
("Report").Range("B62") & vbNewLine & _


--
Rick (MVP - Excel)


"Seanie" wrote in message
...
The code below returns for me the values in Cells E6 & B62, but the
value in B62 is 18.87% but what is returned for me on my code is
0.1847547857. How can I format what is returned as **.**%?


ThisWorkbook.Sheets("Master").Range("E6") & " " & ThisWorkbook.Sheets
("Report").Range("B62") & vbNewLine & _



Seanie

Format Returned Values in VBA Q
 
Thanks, that simple..



All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com