HLOOKUP HELP

Nova1979

Board Regular
Joined
Feb 4, 2020
Messages
111
Office Version
  1. 2010
Platform
  1. Windows
Hello all
I need some help with a suitable formula for a look up. HLOOKUP I think
I need Trial G3 and I3 to search rows in WMS REPORT C:C and M:M. When the row data matches return WMS REPORT K:K into Trial Q3
I have provided what the result should be in trials Q

Trial sheet:
TRIAL 7 SHOP SPREADSHEET.xlsx
GHIJKLMNOQ
1
213/05/2020
3AABDB8010301344874128-Apr-2006-May-2006-May-2008/05/202080591166
4AABDH8012901583925428-Apr-2006-May-2006-May-2008/05/202080747337
5AABDH8012966162866512-May-2012-May-2018-May-2080747337
6AABDH8012901434374922-Apr-2024-Apr-2011-May-2080747337
7AABDE7971300719399720-Apr-2021-Apr-2001-May-2004/05/202011/05/202080541236
8AABDB7995866144818227-Apr-2027-Apr-2004-May-2005/05/202012-May-2080544216
Sheet1


WMS REPORT:
TRIAL 7 SHOP SPREADSHEET.xlsx
CDEFGHIJKLM
1
2AABDB8010310abcd8059116680591166013448741
3AABDH8012910abcd8074733780747337015839254
4AABDH8012920abcd8074733780747337661628665
5AABDH8012930abcd8074733780747337014343749
6AABDE7971310abcd8054123680541236007193997
7AABDB7995810abcd8054421680544216661448182
WMS REPORT


In addition to this, I also need help with an IF formula to match Trial Q3 in WMS REPORT K:K and return the matching row WMS REPORT U:U cell data to wherever I place the formula in Trials sheet

Thank you for any and all help
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
I'm not sure if I am misunderstanding your question, but I think the following formula in cells Q3 and dragged to Q8, would produce what you are looking for.

=+VLOOKUP($A3,'WMS REPORT'!$C$2:$M$7,8,0)

With respect to you second question, I think this should work.

=IF($Q3=VLOOKUP($A3,'WMS REPORT'!$C$2:$M$7,9,0),VLOOKUP($A3,'WMS REPORT'!$C$2:$U$7,19,0),"")
 
Upvote 0
Lexcon,
I adjusted the first formula slightly and it works well. =VLOOKUP($H3,'WMS REPORT'!$C$2:$M$1500,8,0)
I have tried to adjust the second formula without much success
I need Trial X3 to match WMS REPORT K:K and return WMS REPORT U:U to Trial O3
This will then be duplicated for Trial R3, S3 and T3 to reference WMS REPORT V, Y and Z respectively

Here is a XL2BB sample of the end result for Trials sheet.
TRIAL 7 SHOP SPREADSHEET (1).xlsx
QRSTUWX
1PICKEDPICK DATEISSUEDISSUE DATEDeliveredDateERP NUMBER
213/05/2020
3Completed6/11/2019Not StartedN/A11-May-2080851668
4N/AN/AN/AN/A11-May-20N/A
5Completed3/03/2020Not StartedN/A11-May-2080855489
6Completed3/03/2020Not StartedN/A11-May-2080836766
7Completed10/10/2019Completed10/10/201980831769
8Completed14/10/2019Completed14/10/201912-May-2080840821
9Completed14/10/2019Completed14/10/201980855492
Sheet1


Here is a sample for the column refs in WMS REPORT
TRIAL 7 SHOP SPREADSHEET (1).xlsx
KLUVWXYZ
1Original ERP DocumentActivity AreaPicking StatusActual Pick DateStaging StatusShortage Staging QtyGoods Issue StatusActual Goods Issue Date
2
380591166M659Completed6/11/2019B1Completed6/11/2019
480747337S002Completed3/03/2020B1Completed3/03/2020
580747337S002Completed3/03/2020B8Completed3/03/2020
680747337S002Completed3/03/2020B8Completed3/03/2020
780541236M159Completed10/10/2019B1Completed10/10/2019
880544216M159Completed14/10/2019B1Completed15/10/2019
980546258M159Completed14/10/2019B105Completed15/10/2019
WMS REPORT
 
Upvote 0
Is your data in different columns than shown in the first XL2BB images above? If it isn't, I'm not sure how you updated Formula 1 is working.

=VLOOKUP($H3,'WMS REPORT'!$C$2:$M$1500,8,0).

If your looking got "H3" in the Range C2:M1500, based on what I see in your images, it would return an error. Is it supposed to be "G3"?

BTW if you update your formula to include the IFERROR, function your "N/A" will disappear. (i.e. =IFERROR(VLOOKUP($H3,'WMS REPORT'!$C$2:$M$1500,8,0),"")

I need some clarification in your second request.
  • "I need Trial X3 to match WMS REPORT K:K and return WMS REPORT U:U to Trial O3"
Are you only wanting to compare "Trial X3" to the Column K in the "WMS Report"? i.e. Returning a single value? If so, I think a simple VLOOKUP would work

=VLOOKUP($X$3,'WMS REPORT'!$K$2:$U$1500,11,0).
  • "This will then be duplicated for Trial R3, S3 and T3 to reference WMS REPORT V, Y and Z respectively"
If I understand correctly, you want to return the Column U (i.e. "Picking Status") value for whichever row matches "R3" (i.e. "6/11/2019") and that result will be in cell "O3"
=VLOOKUP($R$3,'WMS REPORT'!$V$2:$V$1500,11,0).
=VLOOKUP($S$3,'WMS REPORT'!$K$2:$Y$1500,11,0).
=VLOOKUP($T$3,'WMS REPORT'!$K$2:$Z$1500,11,0).
 
Upvote 0
Sorry, accidentally uploaded before I was ready and I ran out of edit time, so please disregard my last post...

Is your data in different columns than shown in the first XL2BB images above? If it isn't, I'm not sure how your updated Formula 1 is working.

=VLOOKUP($H3,'WMS REPORT'!$C$2:$M$1500,8,0).

If you're looking for "H3" in the Range C2:M1500, based on what I see in your examples, it would return an error. Is it supposed to be "G3"?

BTW if you update your formula to include the IFERROR, function the "N/A"s will disappear. (i.e. =IFERROR(VLOOKUP($H3,'WMS REPORT'!$C$2:$M$1500,8,0),"")

I need some clarification in your second request.
  • "I need Trial X3 to match WMS REPORT K:K and return WMS REPORT U:U to Trial O3"
Are you only wanting to compare cell "Trial X3" (i.e. "80851668") to the contents of "WMS Report Column K"? i.e. Returning a single value from "WMS Report Column U" that corresponds to "Trial X3"? If so, a single VLOOKUP in "Trial O3" should work:

=VLOOKUP($X$3,'WMS REPORT'!$K$2:$U$1500,11,0).

or/

Are you saying you want to compare the contents of "Trial Column X" (i.e. "ERP Number") against the contents of "WMS Report Column K" and return the contents of "WMS Report Column U"? If so, this should be your formula in "Trial O3" and then dragged down to the end of your data set.

=VLOOKUP($X3,'WMS REPORT'!$K$2:$U$1500,11,0).
  • "This will then be duplicated for Trial R3, S3 and T3 to reference WMS REPORT V, Y and Z respectively"
Your answer to the first part will provide some clarity to the second part, but I am still unclear what you want to formula to return if "Trial Cell R3/Column R" matches "WMS Report Column V". Do you want it to return "WMS Report Column U" or do you want it to return some other value?
 
Upvote 0
The last 2 XL2BB images are the exact columns where the data is located.

Formula 1
The reason this does not return an error is because I can use G3, or H3. I was originally thinking I would need to use both G3 and H3 to return the required result which is why I was thinking of a HLOOKUP as I am looking multiple information across the rows.
I adjusted it to IFERROR with a negative return of N/A to make things clearer for others that will be viewing the information

Formula 2
=VLOOKUP($X3,'WMS REPORT'!$K$2:$U$1500,11,0)
I have applied this to Trial column Q with correct results. This returns the correlating result from WMS REPORT U into Trial Q3

This formula is obviously then copied down the column

To clarify (hopefully), =VLOOKUP(X3,'WMS REPORT'$K......... is were it is looking.
This needs to return the correlating pick date in WMS REPORT column V to Trial R3
I require the same search to return WMS REPORT column Y (Goods Issue Status) to return result to Trial S3
I require the same search to return WMS REPORT column Z (Actual Goods Issue Date) to return result to Trial T3

I apologise if I haven't made things clear. I understand the difficulties in helping without knowing all the information being dealt with

Thanks again
 
Upvote 0
I'm still not sure how you can use either "Trial Column G or H" as the Lookup Value for the range "WMS REPORT'!$C$2:$M$1500". without returning an error. The VLOOKUP function looks for the Lookup Value in the left most column of the "Lookup Range" (i.e. "WMS Report Column C" or the "AABD..." Code from image 2 in your original post). The values in "Trial Column G" (i.e. "013448741" from image 1 of your original post) will never find a match in Column C. I cannot see "Trial Columns G & H" or "WMS Report Column C" in the most recent XL2BB images, so I will just assume that something has changed in your data from the first two XL2BB images. It works, that's all that matters...

Now on to the second problem.

I think I understand what you are trying to do now...

You are using the same look up variable (i.e. "Trial Column X") to find the data from "WHS Report Column V", "WHS Report Column Y" and "WHS Report Column Z". You want these values shown in "Trial Columns R, S & T" respectively.

Enter this formula in "Trial R3"

=VLOOKUP($X3,'WMS REPORT'!$K$2:$Z$1500,12,0)

Enter this formula in "Trial S3"

=VLOOKUP($X3,'WMS REPORT'!$K$2:$Z$1500,15,0)

Enter this formula in "Trial T3"

=VLOOKUP($X3,'WMS REPORT'!$K$2:$Z$1500,16,0)

Hope this is what you are looking for.
 
Upvote 0

Forum statistics

Threads
1,214,958
Messages
6,122,475
Members
449,087
Latest member
RExcelSearch

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