Help with which formula to use

sniderrn03

New Member
Joined
Aug 25, 2011
Messages
12
Hello,
I am hoping that I can perform this function in excel. I would like to make a spreadsheet for some lab results. Column C and D would both have values as below:
C D
<TABLE style="WIDTH: 122pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=162 border=0><COLGROUP><COL style="WIDTH: 53pt; mso-width-source: userset; mso-width-alt: 2560" width=70><COL style="WIDTH: 69pt; mso-width-source: userset; mso-width-alt: 3364" width=92><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 53pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" align=right width=70 height=20>28</TD><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 69pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" align=right width=92>600</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" align=right height=20>45</TD><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" align=right>200</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" align=right height=20>50</TD><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" align=right>800</TD></TR></TBODY></TABLE>

I column G, I would like a formula to show the following:
If C3<30 and D3 is <200 then Group1
If C3<30 and D3 is between 200-500 then Group 2
etc.
There are four conditions for if C3<30 and Four conditions for if C3 is between 30-50 and one condition if C3 is >50
I was trying and IF AND formula, however, this is not working for me!
Any help would be greatly appreciated.
Thank you
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Thank you Excelestial. However, is there a way to have all 9 of the conditions in one formula or is that too many. 4 conditions for if C3 is < 30 and 4 conditions for if C3 is 30-50 and one if C3 is >50?
Thank you
 
Upvote 0
=if(and(C3<30, C3>=30,c3<=50,c3>50,D3>=200,D3<=500),"Group 2","Group 1")

A condition consists of if/then...what is the "then" to your 4 conditions? Evaluate the formula above...if C3 meets these conditions paired with one of the conditions of D3...what is the "then?" Once we state one condition, the alternative is a given. Please expound your conditions of C3. Thanks.
 
Upvote 0
Here are the nine conditions that I am trying to account for:

The conditions are as follows:
If C3 is < 30 and D3 <200 Then Group1
If C3 is <30 and D3 is 200-500 then Group 2
If C3 is <30 and D3 is 501-1200 then Group 3
If C3 is < 30 and D3 is >1200 then Group 4
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
If C3 is 30-50 and D3 is <200 then Group 1
If C3 is 30-50 and D3 is 200-500 then Group 4
If C3 is 30-50 and D3 is 501-1200 then Group 4
If C3 is 30-50 and D3 is >1200 then Group 5
<o:p> </o:p>
If C3 is >50 then Group 5

Thank you so much for your help with this
 
Upvote 0
=IF(C3>50,"Group 5",IF(OR(AND(C3<30,D3<200),AND(C3>=30,C3<=50,D3<200)),"Group 1",IF(AND(C3<30,D3>=200,D3<=500),"Group2",IF(AND(C3<30,D3>500,D3<=1200),"Group 3","Group 4"))))
Doing this by imagination...try this...may need a little massaging.
 
Upvote 0
Hi,

Try this: =IF(AND(C3<30;D3<200);"Group1";IF(AND(C3>=30;C3<=50;D3<200);"Group1";IF(AND(C3<30;D3>=200;D3<=500);"Group2";IF(AND(C3<30;D3>500;D3<=1200);"Group3";IF(AND(C3>=30;C3<=50;D3>=200;D3<=1200);"Group4";IF(AND(C3>=30;C3<=50;D3>1200);"Group5";"Group5"))))))
 
Upvote 0

Forum statistics

Threads
1,224,523
Messages
6,179,301
Members
452,904
Latest member
CodeMasterX

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