formula help - vlookups doing weird stuff

%3CLINGO-SUB%20id%3D%22lingo-sub-952240%22%20slang%3D%22en-US%22%3Eformula%20help%20-%20vlookups%20doing%20weird%20stuff%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-952240%22%20slang%3D%22en-US%22%3E%3CP%3EI%20know%20the%20subject%20is%20pretty%20vague%2C%20but%20I%20wasn't%20sure%20how%20else%20to%20phrase%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOK%2C%20this%20is%20going%20to%20be%20a%20bit%20longwinded%2C%20please%20ask%20for%20clarification%20if%20its%20too%20messy.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20handful%20of%20workbooks.%20The%20project%20is%20to%20have%20one%20main%20workbook%20that%20pulls%20data%20from%20the%20others.%20Pretty%20simple%20right%3F%20The%20sheets%20are%20linked%20and%20auto%20update%2C%20that's%20no%20problem.%20The%20issue%20arises%20when%20I%20use%20a%20vlookup%20to%20reference%20another%26nbsp%3B%3CEM%3Etab.%26nbsp%3B%3C%2FEM%3EIf%20the%20criteria%20is%20not%20found%2C%20the%20cell%20remains%20blank%20due%20to%20an%20IFERROR%20statement%20to%20leave%20it%20blank%20upon%20error%2C%20pretty%20straightforward.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20I%20want%20the%20sheet%20to%20do%2C%20however%2C%20is%20when%20the%20criteria%20is%20not%20found%2C%20rather%20than%20leave%20the%20cell%20blank%2C%20I%20want%20the%20formula%20to%20move%20on%20to%20the%20next%20cell.%20One%20solution%20I'm%20finding%20is%20to%20just%20sort%20the%20referenced%20data.%20But%20I%20don't%20want%20to%20have%20to%20do%20that%20every%20time%20the%20workbook%20is%20opened.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F149579i10BA37ADB05886D6%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20goal%20is%20to%20have%20those%20blank%20cells%20replaced%20with%20the%20data%20found%20upon%20matching%20criteria%20-%20make%20sense%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20the%20formula%20to%20return%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F149580iE8AF61E3C621EE6D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20any%20advice%2C%20I'm%20open%20to%20all%20ideas%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJeremy%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-952240%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-952616%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20help%20-%20vlookups%20doing%20weird%20stuff%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-952616%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F433463%22%20target%3D%22_blank%22%3E%40JMcElwain1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhich%20formula%20you%20are%20currently%20using%3F%20Is%20your%20formula%20fetching%20the%20values%20from%20another%20Worksheet%20in%20the%20same%20Workbook%3F%20If%20yes%2C%20could%20you%20please%20share%20a%20sample%20workbook%20(not%20an%20image)%20after%20removing%20any%20sensitive%20info%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-952860%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20help%20-%20vlookups%20doing%20weird%20stuff%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-952860%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394231%22%20target%3D%22_blank%22%3E%40Subodh_Tiwari_sktneer%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere's%20what%20I've%20got%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%2C%20the%20lookup%20is%20fetching%20values%20from%20a%20tab%20that%20holds%20all%20of%20the%20data.%20I'm%20trying%20to%20break%20the%20data%20into%20two%20tabs%20based%20on%20the%20vlookup%20criteria.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20attached%20the%20file.%20Thank%20you!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-954031%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20help%20-%20vlookups%20doing%20weird%20stuff%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-954031%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F433463%22%20target%3D%22_blank%22%3E%40JMcElwain1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETry%20this%20%3CSTRONG%3EArray%20Formula%3C%2FSTRONG%3E%20which%20requires%20confirmation%20with%20%3CSTRONG%3ECtrl%2BShift%2BEnter%3C%2FSTRONG%3E%20instead%20of%20Enter%20alone.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20Booked%20Sheet%2C%3C%2FP%3E%3CP%3EIn%20A2%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DIFERROR(INDEX('All%20Inquiries'!B%242%3AB%244%2CSMALL(IF('All%20Inquiries'!%24A%242%3A%24A%244%3D%22B%22%2CROW('All%20Inquiries'!%24A%242%3A%24A%244)-ROW('All%20Inquiries'!%24A%242)%2B1)%2CROWS(A%242%3AA2)))%2C%22%22)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EConfirm%20with%20%3CSTRONG%3ECtrl%2BShift%2BEnter%3C%2FSTRONG%3E%20and%20copy%20it%20across%20and%20down%20until%20you%20get%20blank%20cells.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExactly%20same%20formula%20you%20need%20on%20Cold%20Sheet%2C%20only%20the%20criteria%20%22B%22%20will%20be%20replaced%20with%20%22C%22%20in%20the%20formula.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20find%20the%20attached%20for%20more%20details.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20have%20access%20to%20dynamic%20array%20formulas%2C%20you%20may%20try%20the%20Filter%20function%20like%20below...%3C%2FP%3E%3CP%3EIn%20A2%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DFILTER('All%20Inquiries'!B2%3AC4%2C'All%20Inquiries'!A2%3AA4%3D%22B%22%2C%22No%20record%20found!%22)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-959134%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20help%20-%20vlookups%20doing%20weird%20stuff%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-959134%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394231%22%20target%3D%22_blank%22%3E%40Subodh_Tiwari_sktneer%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20so%2C%20so%20much!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20able%20to%20get%20the%20formula%20working%2C%20but%20I'm%20still%20not%20able%20to%20get%20it%20to%20skip%20rows%20that%20don't%20match%20the%20criteria.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDespite%20being%20an%20insider%2C%20I%20don't%20have%20access%20to%20the%20FILTER%20function%20(yet).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20attached%20the%20updated%20file%20for%20your%20review%2C%20I%20can't%20seem%20to%20figure%20out%20why%20its%20not%20ignoring%20a%20row%20when%20criteria%20doesn't%20match.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20help!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJeremy%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-962786%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20help%20-%20vlookups%20doing%20weird%20stuff%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-962786%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F433463%22%20target%3D%22_blank%22%3E%40JMcElwain1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat's%20because%20you%20forgot%20to%20lock%20the%20ranges%20used%20in%20the%20formula.%20The%20correct%20formula%20should%20be%20like%20below...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIFERROR(INDEX('All%20Inquiries'!%3CSTRONG%3EB%242%3AB%244%3C%2FSTRONG%3E%2CSMALL(IF('All%20Inquiries'!%3CSTRONG%3E%24A%242%3A%24A%244%3C%2FSTRONG%3E%3D%22B%22%2CROW('All%20Inquiries'!%3CSTRONG%3E%24A%242%3A%24A%244%3C%2FSTRONG%3E)-ROW('All%20Inquiries'!%3CSTRONG%3E%24A%242%3C%2FSTRONG%3E)%2B1)%2CROWS(%3CSTRONG%3EA%242%3C%2FSTRONG%3E%3AA2)))%2C%22%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-963577%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20help%20-%20vlookups%20doing%20weird%20stuff%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-963577%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F433463%22%20target%3D%22_blank%22%3E%40JMcElwain1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20prefer%20this%20flexible%2C%20non-array%20formula%20in%20Booked!A2%20of%20the%20attached%20version%20of%20your%20file%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DIFERROR(INDEX('All%20Inquiries'!%24B%242%3A%24C%244%2C%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EAGGREGATE(15%2C6%2C(ROW('All%20Inquiries'!%24A%242%3A%24A%244)-1)%2F('All%20Inquiries'!%24A%242%3A%24A%244%3D%22B%22)%2CROW()-1)%2C%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EMATCH(A%241%2C'All%20Inquiries'!%24B%241%3A%24C%241%2C0))%2C%22%22)%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I know the subject is pretty vague, but I wasn't sure how else to phrase it.

 

OK, this is going to be a bit longwinded, please ask for clarification if its too messy.

 

I have a handful of workbooks. The project is to have one main workbook that pulls data from the others. Pretty simple right? The sheets are linked and auto update, that's no problem. The issue arises when I use a vlookup to reference another tab. If the criteria is not found, the cell remains blank due to an IFERROR statement to leave it blank upon error, pretty straightforward.

 

What I want the sheet to do, however, is when the criteria is not found, rather than leave the cell blank, I want the formula to move on to the next cell. One solution I'm finding is to just sort the referenced data. But I don't want to have to do that every time the workbook is opened.

 

clipboard_image_0.png

 

My goal is to have those blank cells replaced with the data found upon matching criteria - make sense?

 

I want the formula to return this:

 

clipboard_image_1.png

 

Thanks for any advice, I'm open to all ideas

 

 

Jeremy

 

 

6 Replies

@JMcElwain1 

Which formula you are currently using? Is your formula fetching the values from another Worksheet in the same Workbook? If yes, could you please share a sample workbook (not an image) after removing any sensitive info?

@Subodh_Tiwari_sktneer 

 

Here's what I've got:

 

Yes, the lookup is fetching values from a tab that holds all of the data. I'm trying to break the data into two tabs based on the vlookup criteria.

 

I've attached the file. Thank you!

 

 

 

@JMcElwain1 

Try this Array Formula which requires confirmation with Ctrl+Shift+Enter instead of Enter alone.

 

On Booked Sheet,

In A2

 

=IFERROR(INDEX('All Inquiries'!B$2:B$4,SMALL(IF('All Inquiries'!$A$2:$A$4="B",ROW('All Inquiries'!$A$2:$A$4)-ROW('All Inquiries'!$A$2)+1),ROWS(A$2:A2))),"")

 

Confirm with Ctrl+Shift+Enter and copy it across and down until you get blank cells.

 

Exactly same formula you need on Cold Sheet, only the criteria "B" will be replaced with "C" in the formula.

 

Please find the attached for more details.

 

If you have access to dynamic array formulas, you may try the Filter function like below...

In A2

=FILTER('All Inquiries'!B2:C4,'All Inquiries'!A2:A4="B","No record found!")

 

@Subodh_Tiwari_sktneer 

 

Thank you so, so much!

 

I was able to get the formula working, but I'm still not able to get it to skip rows that don't match the criteria.

 

Despite being an insider, I don't have access to the FILTER function (yet).

 

I've attached the updated file for your review, I can't seem to figure out why its not ignoring a row when criteria doesn't match.

 

Thanks for the help!

 

Jeremy

@JMcElwain1 

That's because you forgot to lock the ranges used in the formula. The correct formula should be like below...

 

=IFERROR(INDEX('All Inquiries'!B$2:B$4,SMALL(IF('All Inquiries'!$A$2:$A$4="B",ROW('All Inquiries'!$A$2:$A$4)-ROW('All Inquiries'!$A$2)+1),ROWS(A$2:A2))),"")

 

 

@JMcElwain1 

I prefer this flexible, non-array formula in Booked!A2 of the attached version of your file: 

=IFERROR(INDEX('All Inquiries'!$B$2:$C$4,
AGGREGATE(15,6,(ROW('All Inquiries'!$A$2:$A$4)-1)/('All Inquiries'!$A$2:$A$4="B"),ROW()-1),
MATCH(A$1,'All Inquiries'!$B$1:$C$1,0)),"")