patrickmuldoon99
Active Member
- Joined
- Jun 27, 2006
- Messages
- 345
Hey all
Does anyone know the syntax / if its possible to explicitly state what the format of the data in a cell should take when I am assigning a value to it?
An example should make it clearer
Now if the cell C5 is formatted as currency, it would be displayed as £120.00. Similarly, if it was formatted as a percentage it would display 12000%. What I want to do is state how I want it formatted as I am writing to the cell. So, what i'm after is something like this:
I need to either display values as plain text, currency (to 2 d.p) or as a percentage.
Can anyone help?!?!
Thanks, Patrick
Does anyone know the syntax / if its possible to explicitly state what the format of the data in a cell should take when I am assigning a value to it?
An example should make it clearer
Code:
Cells(5,3) = 120
Now if the cell C5 is formatted as currency, it would be displayed as £120.00. Similarly, if it was formatted as a percentage it would display 12000%. What I want to do is state how I want it formatted as I am writing to the cell. So, what i'm after is something like this:
Code:
Cells(5,3) = Currency(120)
I need to either display values as plain text, currency (to 2 d.p) or as a percentage.
Can anyone help?!?!
Thanks, Patrick