Return Offset value from a matched lookup

JeffGrant

Well-known Member
Joined
Apr 7, 2021
Messages
558
Office Version
  1. 365
Platform
  1. Windows
Hi All,

What I would like to achieve is this.

Columns A,B & C are exported from an accounting packaging in Australian called MYOB.

Column E comes from another spreadsheet which was used to for counting stock on hand.

I need the value in column E to match column A, then return the offset value 3 rows down, 2 columns across.

as you can see from attempt, the value in E2 returns the value in F2 correctly. But the next two values in column E don't work. I suspect I should be using Index or Xlookup, but I'm not having any success.

Any assistance is great apprecaited.
ITEM.TXT
ABCDEF
1Location IDLocation NameOn HandLookup CodeLookup QTY
201.09.02.01BEATER SPACER - Technogel01.09.02.014
3Q S/PartsIGC QLD Spare Parts Upstairs001.09.02.020
4Q ShowroomIGC QLD Showroom001.09.02.030
5Q W'houseIGC QLD Warehouse3#N/A
6Total:4#N/A
701.09.02.02 BEATER SCRAPER - Technogel#N/A
8Q S/PartsIGC QLD Spare Parts Upstairs0#N/A
9Q ShowroomIGC QLD Showroom0#N/A
10Q W'houseIGC QLD Warehouse1#N/A
11Total:1#N/A
1201.09.02.04 Rear Beater Seal - Technogel#N/A
13Q S/PartsIGC QLD Spare Parts Upstairs0#N/A
14Q ShowroomIGC QLD Showroom0#N/A
15Q W'houseIGC QLD Warehouse13#N/A
16Total:13#N/A
1701.09.02.06 DOWEL PAD PIN - Technogel#N/A
18Q S/PartsIGC QLD Spare Parts Upstairs0#N/A
19Q ShowroomIGC QLD Showroom0#N/A
20Q W'houseIGC QLD Warehouse3#N/A
21Total:3#N/A
2201.09.02.07 O’Ring Extraction Door #N/A
23Q S/PartsIGC QLD Spare Parts Upstairs0#N/A
24Q ShowroomIGC QLD Showroom0#N/A
25Q W'houseIGC QLD Warehouse1#N/A
26Total:1#N/A
2701.09.02.08 BEATER SCRAPER - Technogel#N/A
28Q S/PartsIGC QLD Spare Parts Upstairs0#N/A
29Q ShowroomIGC QLD Showroom0#N/A
30Q W'houseIGC QLD Warehouse1#N/A
31Total:1#N/A
32022881 Inline Power Filter 1A#N/A
33Q S/PartsIGC QLD Spare Parts Upstairs0#N/A
34Q ShowroomIGC QLD Showroom0#N/A
35Q W'houseIGC QLD Warehouse0#N/A
36Total:0#N/A
Sheet1
Cell Formulas
RangeFormula
F2:F29F2=OFFSET(A2,MATCH(E2,$A$2:$A$392,TRUE)+3,2)
F30:F36F30=OFFSET(A30,MATCH(E30,A30:A420,TRUE)+3,2)

ITEM.TXT
ABCDEF
1Location IDLocation NameOn HandLookup CodeLookup QTY
201.09.02.01BEATER SPACER - Technogel01.09.02.014
3Q S/PartsIGC QLD Spare Parts Upstairs001.09.02.020
4Q ShowroomIGC QLD Showroom001.09.02.030
5Q W'houseIGC QLD Warehouse3#N/A
6Total:4#N/A
701.09.02.02 BEATER SCRAPER - Technogel#N/A
8Q S/PartsIGC QLD Spare Parts Upstairs0#N/A
9Q ShowroomIGC QLD Showroom0#N/A
10Q W'houseIGC QLD Warehouse1#N/A
11Total:1#N/A
1201.09.02.04 Rear Beater Seal - Technogel#N/A
13Q S/PartsIGC QLD Spare Parts Upstairs0#N/A
14Q ShowroomIGC QLD Showroom0#N/A
15Q W'houseIGC QLD Warehouse13#N/A
16Total:13#N/A
1701.09.02.06 DOWEL PAD PIN - Technogel#N/A
18Q S/PartsIGC QLD Spare Parts Upstairs0#N/A
19Q ShowroomIGC QLD Showroom0#N/A
20Q W'houseIGC QLD Warehouse3#N/A
21Total:3#N/A
2201.09.02.07 O’Ring Extraction Door #N/A
23Q S/PartsIGC QLD Spare Parts Upstairs0#N/A
24Q ShowroomIGC QLD Showroom0#N/A
25Q W'houseIGC QLD Warehouse1#N/A
26Total:1#N/A
2701.09.02.08 BEATER SCRAPER - Technogel#N/A
28Q S/PartsIGC QLD Spare Parts Upstairs0#N/A
29Q ShowroomIGC QLD Showroom0#N/A
30Q W'houseIGC QLD Warehouse1#N/A
31Total:1#N/A
32022881 Inline Power Filter 1A#N/A
33Q S/PartsIGC QLD Spare Parts Upstairs0#N/A
34Q ShowroomIGC QLD Showroom0#N/A
35Q W'houseIGC QLD Warehouse0#N/A
36Total:0#N/A
Sheet1
Cell Formulas
RangeFormula
F2:F29F2=OFFSET(A2,MATCH(E2,$A$2:$A$392,TRUE)+3,2)
F30:F36F30=OFFSET(A30,MATCH(E30,A30:A420,TRUE)+3,2)
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
You could use the following formula in F2

=INDEX(C:C,MATCH(E2,A:A,0)+4)

See my spreadsheet layout for your data

1624931306497.png


Kind regards

Saba
 
Upvote 0
Solution
MYOB AR is definitely not a lot of fun with giving out the data to manipulate any more :-(
 
Upvote 0
No problem, it means that lookup value does not exist in Column A (that is no matching value found in A).

If the NA value is legitimate and you do not want to show these NAs, you could modify the formula as shown below.

=IFERROR(INDEX(C:C,MATCH(E2,A:A,0)+4),"")

Kind regards

Saba
 
Upvote 0
I use it to extract data for my analysis purpose and have to use Excel power query to get the data in the format that I want.
 
Upvote 0
Hi Saba, the formula works great, the problem with the format of the cell when MYOB does the export :-( Thanks for your help
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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