View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 1,311
Default IF formula help - incorporate greater than & smaller than

One question...what if the number is equal to 4? It looks like your
attempted formula references that, but your explanation does not.

If there only be number entries in P7 (or nothing), then the formula can be
even simpler.

=IF(P7=0,1,IF(P7<1,2,IF(P7<2,3,IF(P7<3,4,IF(P7<4,5 ,6)))))

Regards,
Paul


--

"Aaron Hodson (Coversure)" wrote in message
...
Thanks Paul,
Works a treat,
Am kicking myself as I type!!!

"PCLIVE" wrote in message
...
If you will not have any values less than zero, then one way:

=IF(P7=0,1,IF(P7<1,2,IF(P7<2,3,IF(P7<3,4,IF(P7<4,5 ,IF(P74,5,0))))))

HTH,
Paul

--

"Aaron Hodson (Coversure)" wrote in message
...
I am trying to use the below formula in cell C7:

=IF(P7=0,1,IF(P7=0<1,2,IF(P7=1<2,3,IF(P7=2<3,4,IF( P7=3<4,5,IF(P7=4,5,0))))))

The idea is that if P7 equals 0, then C7 will show 1
If P7 is greater than 0 and less than 1, then C7 will show 2
If P7 is equal to 1 but less than 2, then C7 will show 3
If P7 is equal to 2 but less than 3, then C7 will show 4
If P7 is equal to 3 but less than 4, then C7 will show 5
If P7 is greater than 4, then C7 will show 6

At present only '0' works in p7 showing '1' in C7

Thanks in anticipation,

I am sure I will kick myself when I see the answer!

Thanks

Aaron