Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel percentage variable ??? 1

Status
Not open for further replies.

shadyness

MIS
Dec 21, 2001
89
US
Hey everyone,

I have an excel user form with a text box, whose value is passed into a worksheet. One of the cells is a percentage value, but if I pass a value as an integer, say 2, it becomes 200%. Is there anyways to make 2 be 2% without making the user enter .02?

Thanks-- <== Some people say they are afraid of heights. With me its table widths. ==>
 
Yeah, divide the value by 100 before passing it on to the worksheet cell. Or, alternatively, don't format the cell as a % numberformat. The true value of a cell that reads 200% is 2, you can't do anything about that bit.
Rob
[flowerface]
 
Yeah, I was afraid of that. The only reason that I have not done that yet, was I didn't want to divide .0X by 1000 if that happened. Thanks Rob, you're all over this forum!

--Ian <== Some people say they are afraid of heights. With me its table widths. ==>
 
If the cell has % number format and you want to pass 2 as 2%, etc., go to Tools>Options dialog, and check automatic % recognition box (or similar, it's my translation) on Edit tab.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top