SOLVED

Help with excel if

Copper Contributor

Hi,

 

I'm trying to write a formula so that IF D5 = "Yes" AND D3 = "Data Collection" then to do VLOOKUP within a different tab named Data Collection. However I'd like this same formula to do a different VLOOKUP within the MRA tab if D5 = "Yes" AND D3 = "MRA." 

I was able to write the first half of the formula: 

=IF(AND(D5="Yes",D3="Data Collection"),VLOOKUP(D4,'Data Collection codebook'!B3:F165,5,FALSE),"")

But I can't figure out how to incorporate the second half. 

Any help would be greatly appreciated.

 

Thanks, Ciara 

2 Replies
best response confirmed by HansVogelaar (MVP)
Solution

@Ciara385 

=IF(AND(D5="Yes",D3="Data Collection"),

VLOOKUP(D4,'Data Collection codebook'!B3:F165,5,FALSE),

IF(AND(D5="Yes",D3="MRA."),

VLOOKUP(D4,MRA.!B3:F165,5,FALSE),""))

 

Maybe like this.

 

Thank you!
1 best response

Accepted Solutions
best response confirmed by HansVogelaar (MVP)
Solution

@Ciara385 

=IF(AND(D5="Yes",D3="Data Collection"),

VLOOKUP(D4,'Data Collection codebook'!B3:F165,5,FALSE),

IF(AND(D5="Yes",D3="MRA."),

VLOOKUP(D4,MRA.!B3:F165,5,FALSE),""))

 

Maybe like this.

 

View solution in original post