Simple formula required

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,213
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
Formula required in F2.

Sheet1

BCDEF
2147.65146.00153.85143.20

<colgroup><col style="FONT-WEIGHT: bold; WIDTH: 30px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"></colgroup><tbody>
</tbody>

Conditions:
IF B2>D2 then 1 else
IF B2<=D2 AND >C2 then 2 else
IF B2>=E2 AND <C2 then 3 else
IF B2<E2 then 4 else null (blank)

Thanks in adv
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
I think you'll find your last condition isn't complete. Try putting an empty space after the < symbol and post again.
 
Upvote 0
Conditions:
IF B2>D2 then 1 else
IF B2<=D2 AND >C2 then 2 else
IF B2>=E2 AND <c2 then="" 3="" else
IF B2 is less than C2 then 3 else IF B2 is less than E2 then 4 else null</c2>
 
Upvote 0
I must agree to a certain extent with M.A.I.T. as it does always amaze me that posters put in words like "simple" and "easy" when they are asking the question (so by default don't know the answer) so can't know whether it is simple or not.

Anyway gripe over, if I haven't missed anything try the formula below (remove the spaces).

=IF(B2>D2,1,IF(AND(B2< =D2,B2 >C2),2,IF(AND(B2>=E2,B2< C2),3,IF(B2< E2,4,""))))
 
Last edited:
Upvote 0
deleted<e2,4,if(b2<c2,3,""))))[ code]
</e2,4,if(b2<c2,3,""))))[>
 
Last edited:
Upvote 0
Hi Mike, I think you also need to put a space after the < symbols :cool:
 
Upvote 0
Another version :-
Code:
=IF(B2> D2,1,IF(B2> C2,2,IF(B2< E2,4,IF(B2< C2,3,""))))
maintaining the integrity of Mark858's formula without the ANDs.
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,816
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top