mulitple conditions in a formula

GeekMan

New Member
Joined
Jul 1, 2012
Messages
17
hi all

I hope I can make this clear...

I have a range of data in a drop down box that enters into column G, then generates a vlookup for column K of N or R or blank. However if column R has data = YES then column K must = N and I have worked a formula for this, BUT if one particular piece of data (one of the same incident) in column G is there then column K must stay blank even if column R = yes.

I have got an if formula that works if the G data (one of the same) and the R data (YES) are the same but that overides the ability to force the K column to N for all other data.

I essentially have to have a formula that allows multiple conditions is that right?

happy to upload the sheet if it helps

cheers:eek:
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
ok got it see last post for HTM post

row 29 data in column G = MINOR FIRE = this generates data R in column K.

row 30 we have had a use of force (column R) changing the data from R to N. this automatically changes any R data in column K to N for any incident (an overide)

row 31 is data 'one of the same incident' if multiple offendors are involved. normally no other vlookup data loads there

so now

row 32 I want to keep data YES in column R but have nothing in column K IF and ONLY if 'one in the same incident' is selected.

happy to explain further or in more detail

cheers

I think I know what you are looking for

Am I right i saying that if there is a YES in R then there should be nothing in K?
 
Upvote 0
thanks skybluekid

you're on the right track but in summary

YES in column R forces "N" in K (this bit already set) >> UNLESS G = 'ONE OF THE SAME INCIDENT" in which case I want nil or N/A in column K
 
Upvote 0
Try this

K32 =IF(R32="Yes","N",(IF(R26="",VLOOKUP(G26,Data!$A$4:$G$54,5,0),(IF(G32="ONE OF THE SAME INCIDENT","N/A")))))
 
Upvote 0
the formula needs to look at data in the same line sorry - may have confused with my paste....

try again ---

same row only

if data in column R = YES and data in column G = one of the same incident then k = n/a otherwise any other data in column G uses the VLOOKUP or YES in column R forces N in column K
 
Upvote 0
K32 =IF(AND(R32="Yes",G32="ONE OF THE SAME INCIDENT"),"N/A",(IF G32<>"ONE OF THE SAME INCIDENT",VLOOKUP(G23,Data!$A$4:$G$54,5,0),(IF R32="Yes","N")))))

I think this is what you require. you might need to check the number of brackets.
 
Upvote 0
getting close

your formula when entered had errors but got this to run without them

=IF(AND(R32="Yes",G32="ONE OF THE SAME INCIDENT"),"N/A",IF(G32<>"ONE OF THE SAME INCIDENT",VLOOKUP(G32,Data!$A$4:$G$54,5,0),IF(R32="Yes","N")))

but it does not do the force N into column K if column R = YES

sorry if my corrections have ruined the logic of your formula
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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