VLookup or Offset Match for multiple criteria

geigMR

Board Regular
Joined
Sep 27, 2011
Messages
51
Hi folks

I'm not quite sure how or if this is possible but what I am wanting to do is lookup a number of column fields in another worksheet and if they ALL match exactly then return a value from that sheet. Any help would be massively appreciated! I have 3 sheets and at the far right of the 3rd sheet ('hun') I have 2 results columns: one to lookup to worksheet 1 ('arq') and the other to lookup to worksheet 2 ('jot').

Please see my attached spreadsheet. I have manually entered the results in columns U & V of 'hun' that should happen if the formula/macro works correctly. The columns in 'hun' that should be matched exactly in the other sheets are titled 'cgt', 'app', 'pinto', 'fen', 'iso', 'con', & 'res'.

sheet1:
Excel 2012
ABCDEFGHIJKLMNOPQ
1DATED:11/12/2015
2proBcgtapppintofenisoconresJKLMNOarqFIGQ
3HK72115/(-281R)misc0.40GBBD2BGRXRXNmiscmiscmiscmiscmiscmisc612misc
4HK72685/(-152R)misc0.40GBD2BGRXBGNmiscmiscmiscmiscmiscmisc606misc
5HK79895/(-239R)misc0.40FBD2BGRXBGNmiscmiscmiscmiscmiscmisc552misc
6HK85111/-239Rmisc0.41GBD2RxRXRXNmiscmiscmiscmiscmiscmisc493misc
7HK85332/(-239R)misc0.43FBBD2BGBGBGNmiscmiscmiscmiscmiscmisc572misc
8HK90113/(-239R)misc0.45GDI1GRXBGNmiscmiscmiscmiscmiscmisc434misc
9HK90115/(-219R)misc0.45FDI1IDIDIDNmiscmiscmiscmiscmiscmisc434misc
10HK90116/(-269R)misc0.46GDI1BGBGBGNmiscmiscmiscmiscmiscmisc434misc
11HK90202/(-298R)misc0.47GBBD1RXRXBGNmiscmiscmiscmiscmiscmisc440misc
12HK90204/(-219R)misc0.49GDI1BGRXRXNmiscmiscmiscmiscmiscmisc434misc

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
arq



Sheet2:
Excel 2012
ABCDEFGHIJKLMNOPQR
1DATED:11/12/2015
2AprocgtDapppintoGfenisoconresLMNOPjotFIGR
3miscLKEK/72598/G0.40miscFBD2miscRXBGRXGNTmiscmiscmiscmiscmisc£510.00misc
4miscLKEK/84116/G0.40miscGBD2miscBGRXBGGNTmiscmiscmiscmiscmisc£490.00misc
5miscLKEK/89820/G0.42miscGBD2miscRXRXRXNmiscmiscmiscmiscmisc£512.00misc
6miscLKEK/02948/G0.42miscGBD2miscRXRXRXNmiscmiscmiscmiscmisc£512.00misc
7miscLKEK/98081/G0.42miscFDI1miscRXBGBGNmiscmiscmiscmiscmisc£452.00misc
8miscLKEK/52737/G0.44miscFDI1miscRXBGBGNmiscmiscmiscmiscmisc£452.00misc
9miscLKEK/16442/G0.45miscFDI1miscIDIDIDNmiscmiscmiscmiscmisc£442.80misc
10miscLKEK/44604/G0.45miscFDI1miscBGIDIDNmiscmiscmiscmiscmisc£524.80misc
11miscLKEK/88690/G0.45miscFDI1miscRXRXRXNmiscmiscmiscmiscmisc£463.30misc
12miscLKEK/89409/G0.48miscGDI1miscRXRXRXNmiscmiscmiscmiscmisc£466.20misc

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
jot



Sheet3:
Excel 2012
ABCDEFGHIJKLMNOPQRSTUV
1DATED:08/12/2015rate0.657255
2proBcgtDapppintofenisoconJKLresNOPQRShunFIGarqFIGjotFIG
3VE4D62A2-19misc0.40miscFDI1BGRXBGmiscmiscmiscNmiscmiscmiscmisc$754 misc£496not foundnot found
4VE22B85Z13-198misc0.40miscFBD2BGRXBGmiscmiscmiscNmiscmiscmiscmisc$853 misc£561£552not found
5VE14B70H18-662misc0.43miscFBBD1GRXBGmiscmiscmiscFmiscmiscmiscmisc$794 misc£522not foundnot found
6VE22B22Z20-44misc0.43miscFBBD2IDRXIDmiscmiscmiscNmiscmiscmiscmisc$928 misc£610not foundnot found
7VE1A07E1-539misc0.44miscFBD1IDIDIDmiscmiscmiscNmiscmiscmiscmisc$918 misc£604not foundnot found
8VE8Z33E15-5misc0.45miscFDI1BGIDIDmiscmiscmiscNmiscmiscmiscmisc$764 misc£502not found£524.80
9VE8C53F15-431misc0.45miscFDI1IDIDIDmiscmiscmiscNmiscmiscmiscmisc$782 misc£514£434£442.80
10VE6H81B15-341misc0.47miscGBD2GBGBGmiscmiscmiscMmiscmiscmiscmisc$640 misc£421not foundnot found
11VE10Z04G11-232Amisc0.47miscGBBD1RXRXBGmiscmiscmiscNmiscmiscmiscmisc$916 misc£602£440not found
12VE14B70H18-1201misc0.49miscGDI1RXIDIDmiscmiscmiscNmiscmiscmiscmisc$748 misc£492not foundnot found

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
hun




I have noticed that the 'jotFIG' figures (that are pasted from an external source) in col. Q of sheet 2 have four spaces to right so do not in fact have a number format, so I don't know if it is possible to also incorporate some kind of trim function that changes this to a number.

Thanks for any help!
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
I now have
Sub test()'
' test Macro
'


'
rownum = 39
For a = 5 To 14
For b = 2 To 8
c = a + 20
If Cells(a, b) = Cells(c, b) Then Sum = Sum + 1
Next b
If Sum = 7 Then GoTo 200 Else GoTo 300
200 Sum = 0
rownum = rownum + 1
For Z = 2 To 9
zz = Z
Cells(rownum, Z) = Cells(a, Z)
Next Z
Cells(rownum, zz + 1) = Cells(c, 9)
300 Sum = 0
Next a


End Sub

but it still does nothing. Have I written this correctly?
 
Upvote 0
eg for z=2 to 9 the 2 is because the first row of data is row 2 the 9 because there is 8 rows of data
for a = 5 to 14
this is looking at columns 5 to 14
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

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