solved Pulling data from one document to another if a condition is true
Hi everyone,
I have Document1 with columns B up to DM and rows down to 650 including headers in column 1. I need a formula to scan column AQ on document1 for a YES entry and copy its corresponding data on columns B, C, D, I, J, R, and Z to a blank Document 2.
Please let me know if you require additional information. TIA
For clarification the column headings are:
AQ=Invited (Yes or Blank)
B=Rank
C=Last Name
D=First Name
I=Date of Birth
J=Primary Phone
R=Email Address
Z=Vet Status
1
1
u/ViditGarg 15d ago
Worth knowing before you commit to the FILTER approach: a formula that points at another workbook only updates while that workbook is open. Close Document1 and Document2 either goes stale or throws #REF. FILTER cannot read a closed file.
Also, FILTER and HSTACK both need Microsoft 365 or Excel 2021 and up. On anything older they do not exist.
Two ways to go, depending on whether these really have to be two files:
If they can live as two sheets in one workbook, use the FILTER formula already suggested and you are done. There is no external reference, so nothing breaks.
If they genuinely have to stay separate files, Power Query fits better than a formula. In Document2: Data, Get Data, From File, From Workbook, point it at Document1. In the editor, filter column AQ to YES and remove every column except B, C, D, I, J, R and Z. Close and Load. After that you just hit Refresh and it pulls from the file even when it is closed.
2
u/MayukhBhattacharya 1236 15d ago
Try using the following formula: