View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default RIGHT function doesn't read 0's

what the cell contains and what you see depends upon whatever formattign you
have, when you use a STRING function on a cell containiong a number you'll
get these 'strange' results
fro example , type 30 into any unformatted cell, then format to 2 dps. Nowin
the immediate window type
?right(selection.text,5)
I get
0.00 whe I'd have expected to see 30.00
... there's a trailing space. so specifically format numbers before you test
them with string functions is the rule!






"nikita" wrote:

If I use RIGHT,2 on a cell with the value 30.00, it's output is 3, not
0. What's going on here?