How to have the statement check the next row if the IF AND statement is false

mrsspdy

New Member
Joined
Jun 13, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I am pulling data from one worksheet to another if the value of cell A9 (on the second worksheet) is not blank AND the value of a cell in D9 (on the second worksheet) equals a specific word or text string return the value of A9. If the criteria is not met I need it to check the next row and return the value of B9, etc. I have tried using the IF AND function but cannot figure out how to make it check the next row if the criteria is not met. I saw an answer to a similar question from 2018 that was answered using a formula containing the INDEX function, but I just don't understand formulas well enough to apply it to my data.

Here is the formula I am typing --=IF(AND('Verifications - PMO'!A9<>"", 'Verifications - PMO'!D9="Area 4"), 'Verifications - PMO'!A9,"")

Original spreadsheet:
1686714554906.png


What I am getting back:
1686714459710.png


Expected return:
1686714513679.png


This may be a short-lived project since columns D on have nested IF functions that relate back to the A Column of the original cell i.e, =IF($A7="","",IF('Verifications - PMO'!E9="PW","Paperwork",IF('Verifications - PMO'!E9="N/T",1,IF('Verifications - PMO'!E9="T",2,IF(AND(ISNUMBER('Verifications - PMO'!E9),'Verifications - PMO'!E9>0,NOT(ISERROR(SEARCH("(QT)",$A7)))),4,IF(AND(ISNUMBER('Verifications - PMO'!E9),'Verifications - PMO'!E9>0),3,IF('Verifications - PMO'!E9="","Check",IF('Verifications - PMO'!E9="N/R","Not Required"))))))))

If I am reading this right it means it that if A7 has data (the new operator name) then it will be pull the data from the column E9 of the original spreadsheet which relates to the old operator name. Is that correct?

Thanks in advance for your guidance.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I note your profile shows you have 365, therefore the Filter() function is available to you. Here's one possible solution:
From this data source:
Book1
ABCD
1EmployeeUSER IDShiftArea
2Maximoff, WandaCArea 2
3Parker, PeterCArea 2
4Richards, SusanBArea 3
5Stark, TonyDArea 5
6Van Dyne, JanetCArea 4
7Walker, PatsyBArea 4
8Wayne, BruceDArea 2
9Whitman, DaneDArea 2
Verifications - PMO


You could do this:
Book1
ABC
1EmployeeShiftArea
2Van Dyne, JanetCArea 4
3Walker, PatsyBArea 4
4
Sheet2
Cell Formulas
RangeFormula
A2:C3A2=FILTER(FILTER('Verifications - PMO'!A2:D9,('Verifications - PMO'!D2:D9<>"")*('Verifications - PMO'!D2:D9="Area 4")),{1,0,1,1})
Dynamic array formulas.
 
Upvote 0
Typo in the previous post, should have been (well spotted @Alex Blakenburg (y) )
Book1
ABC
1EmployeeShiftArea
2Van Dyne, JanetCArea 4
3Walker, PatsyBArea 4
4
Sheet2
Cell Formulas
RangeFormula
A2:C3A2=FILTER(FILTER('Verifications - PMO'!A2:D9,('Verifications - PMO'!A2:A9<>"")*('Verifications - PMO'!D2:D9="Area 4")),{1,0,1,1})
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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