View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
FreddieP FreddieP is offline
external usenet poster
 
Posts: 24
Default fHow to write in a formula "if a nuber s between these two num

Hi Carim, thanks for your help, but if the value in cell B1 is 20 which is
the exact value of A2 it still returns A3=30.

Also some times A2 and/or A3 can be empty and ten it returns 0.
Any suggestions?

/Freddie

"Carim" wrote:

Hi Freddie,

Assuming your numbers 10 20 30 are located in cells A1, A2, A3
and that the number to be tested is in cell B1,
then in cell C1 you could have :
=IF(B1<A2,A1,IF(AND(B1<A3,B1A2),A2,A3))

HTH
Cheers
Carim