how to use vlookup to list data in multiple columns of a different sheet

%3CLINGO-SUB%20id%3D%22lingo-sub-1392318%22%20slang%3D%22en-US%22%3Ehow%20to%20use%20vlookup%20to%20list%20data%20in%20multiple%20columns%20of%20a%20different%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1392318%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20trying%20to%20do%20the%20data%20storage%20and%20a%20clear%20data%20display%20in%202%20sheets%2C%20in%20which%20it%20will%20work%20as%20example%20below%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESheet%201(%3CSPAN%3Edetails%7C%20revenue%7C%20outlay%20repeat%20about%2020%20times%3C%2FSPAN%3E)%3C%2FP%3E%3CP%3E%3CSPAN%3Einvoice%7C%20details%7C%20revenue%7C%20outlay%7C%20details%7C%20revenue%7C%20outlay%7C%20details%7C%20revenue%7C%20outlay...%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EIData1%20%7CDData1%7CRData1%20%7COData1%7CDData2%7CRData2%20%7COData2%7CDData3%7CRData3%20%7COData3...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESheet%202%3C%2FP%3E%3CP%3Einvoice%26nbsp%3B%20%26nbsp%3BIData1%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Edetails%7C%20revenue%7C%20outlay%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EDData1%7CRData1%20%7COData1%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EDData2%7CRData2%20%7COData2%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EDData3%7CRData3%20%7COData3%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E...%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ESumOfRData%7CSumOfOData%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20used%20define%26amp%3Bname%20and%20data%20validation%20to%20finish%20the%20invoice%20part%2C%20but%20I'm%20stuck%20at%20the%20%5Bdetails%7C%20revenue%7C%20outlay%5D%2C%20as%20the%20vlookup%20could%20not%20support%20such%20operation.%20Is%20there%20any%20way%20I%20can%20do%20this%2C%20showing%20the%20data%20according%20to%20the%20%22IData%22%20value%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EMoreover%2C%20for%20some%20cases%2C%20those%20%5Bdetails%7C%20revenue%7C%20outlay%5D%20may%20not%20be%20filled%20by%2020%20different%20items%20every%20time%2C%20sometimes%20may%20be%20only%204%20to%205%20would%20be%20filled%2C%20so%20any%20way%20make%20sheet%202%20be%20smart%2C%20hiding%20the%20empty%20rows%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1392318%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-1392735%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20use%20vlookup%20to%20list%20data%20in%20multiple%20columns%20of%20a%20different%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1392735%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F668591%22%20target%3D%22_blank%22%3E%40tony530%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETony%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ecan%20you%20supply%20an%20example%20spreadsheet%20as%20it%20is%20difficult%20to%20understand%20your%20problem%20based%20on%20just%20the%20text.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPeter%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1392841%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20use%20vlookup%20to%20list%20data%20in%20multiple%20columns%20of%20a%20different%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1392841%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F667968%22%20target%3D%22_blank%22%3E%40peteryac60%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eit's%20something%20like%20this%2C%20sheet1%20store%20the%20data%20horizontally%2C%20and%20sheet2%20display%20the%20data%20according%20to%20the%20job%20number%20selected%20in%20the%20drop-down%20menu.%3C%2FP%3E%3CP%3Esheet3%20is%20the%20example%20using%20jn1%20as%20the%20selected%20one%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Emany%20thx%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1395311%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20use%20vlookup%20to%20list%20data%20in%20multiple%20columns%20of%20a%20different%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1395311%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F668591%22%20target%3D%22_blank%22%3E%40tony530%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Tony%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20come%20up%20with%20a%20possible%20solution%20using%20the%20OFFSET%20command%20and%20a%20rather%20convoluted%20formula%20-%20but%20it%20seems%20to%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20not%20sure%20how%20you%20get%20your%20source%20data%20(is%20it%20manual%3F)%20but%20you%20might%20want%20to%20consider%20changing%20the%20format%20to%20make%20it%20easier%20to%20manipulate%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyway%20if%20you%20are%20happy%20with%20the%20solution%20please%20mark%20it%20as%20complete.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Emany%20thanks%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPeter%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1397480%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20use%20vlookup%20to%20list%20data%20in%20multiple%20columns%20of%20a%20different%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1397480%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F668591%22%20target%3D%22_blank%22%3E%40tony530%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20have%20365%2C%20this%20is%20the%20way%20to%20go%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DSUBSTITUTE(INDEX(FILTER(Master!C%3ABJ%2CMaster!B%3AB%3DList!%24B%241)%2C1%2CSEQUENCE(20%2C3%2C1%2C1))%2C0%2C%22%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

I'm trying to do the data storage and a clear data display in 2 sheets, in which it will work as example below:

 

Sheet 1(details| revenue| outlay repeat about 20 times)

invoice| details| revenue| outlay| details| revenue| outlay| details| revenue| outlay...

IData1 |DData1|RData1 |OData1|DData2|RData2 |OData2|DData3|RData3 |OData3...

 

Sheet 2

invoice   IData1

 

details| revenue| outlay

DData1|RData1 |OData1

DData2|RData2 |OData2

DData3|RData3 |OData3

...

 

SumOfRData|SumOfOData

 

I used define&name and data validation to finish the invoice part, but I'm stuck at the [details| revenue| outlay], as the vlookup could not support such operation. Is there any way I can do this, showing the data according to the "IData" value?

 

Moreover, for some cases, those [details| revenue| outlay] may not be filled by 20 different items every time, sometimes may be only 4 to 5 would be filled, so any way make sheet 2 be smart, hiding the empty rows?

4 Replies
Highlighted

@tony530 

 

Tony 

 

can you supply an example spreadsheet as it is difficult to understand your problem based on just the text.

 

Peter

Highlighted

@peteryac60 

it's something like this, sheet1 store the data horizontally, and sheet2 display the data according to the job number selected in the drop-down menu.

sheet3 is the example using jn1 as the selected one

 

many thx

Highlighted

@tony530 

Hi Tony,

 

I have come up with a possible solution using the OFFSET command and a rather convoluted formula - but it seems to work.

 

I am not sure how you get your source data (is it manual?) but you might want to consider changing the format to make it easier to manipulate? 

 

Anyway if you are happy with the solution please mark it as complete. 

 

many thanks,

 

Peter

Highlighted

@tony530 

If you have 365, this is the way to go:

 

=SUBSTITUTE(INDEX(FILTER(Master!C:BJ,Master!B:B=List!$B$1),1,SEQUENCE(20,3,1,1)),0,"")