jp0202
jp0202

Reputation: 23

How to read formatted cell value data using excel vba?

What I'm trying to is read formatted cell value in excel 2007 using VBA.

For example I have a cell with value "01/01/2015" and when formatted it looks like Jan/2015. Is there a way to read that formatted value Jan/2015 into a variable instead of "01/01/2015"?

Thank you

Upvotes: 0

Views: 8497

Answers (1)

Dmitry Pavliv
Dmitry Pavliv

Reputation: 35853

try to use

someVariable = Range("A1").Text

instead

someVariable = Range("A1").Value

you can read more here

Upvotes: 2

Related Questions