Suppose your number is in A1. Try this in B1:
=TEXT(A1,IF(A1>10,"0",0.00"))
This will return a text value, and it will round the number, so if
your number is 10.6 it will show 11.
If you don't want this, then here's an alternative:
=IF(A1>10,INT(A1),A1)
Format the cell as General. This time 10.6 will show as 10, and 9.95
will show as 9.95.
If you want this to happen to your cell which contains the VLOOKUP
formula, then just substitute your formula for A1 in the above.
Hope this helps.
Pete
On Sep 11, 10:29*am, Valeria <Vale...@discussions.microsoft.com>
wrote:
> Dear experts,
> I have a table which looks up values from a database; this table is linked
> to a cell where I can select what I want to see in the table.
> Now, sometimes the values I want to see need to be in a 2 decimal format
> (ex. 2.43) and sometimes they need to have no decimals at all (ex. 25000).. It
> really all depends on their magnitude - when <10 then I need to have 2
> decimals, if > 10 then no decimal is needed.
> Is there a way to do this in Excel 2003?
> Many thanks for your help!
> Kind regards
> --
> Valeria
|