Using lookups to find value based on two conditions.

hgoodall

New Member
Joined
Jun 13, 2018
Messages
11
Hello I am wanting to write a lookup which will bring back a value based on two conditions.

in sheet 1 I want to lookup Group (Column G) and Group counter(column H) and find the long text from sheet 2 column E.

(not all of the long text for each group is the same, each group counter can have different text, this is why I can't just do a lookup on the group)

Sheet 1

G H I
GroupGroup CounterLong text (want to bring back long text into here from sheet 2)
1110000 1
11100021
11100031
11100051
11100061
11100071
11100071
11100071
11100071

<tbody>
</tbody><colgroup><col><col><col></colgroup>


sheet 2

B C D E
GroupGroup CounterShort TextLong Text
9881CHECK CONDITION OF SITE DOSING LINESCHK SAMPLE, DOSING & MOTIVE WATER LINES.CHECK & INSPECT CONDITION OF LINES &CHAMBERS:CL2, pH & CONDUCTIVITY SAMPLE LINES,CL2INJECTION LINES,MOTIVE WATER LINES.
10321Weekly site proactive task listNo long text
11541TAKE ELECTRIC METER READINGNo long text
11542TAKE ELECTRIC METER READINGNo long text
11543TAKE ELECTRIC METER READINGNo long text
11544TAKE ELECTRIC METER READINGNo long text
11545TAKE ELECTRIC METER READINGNo long text
11546TAKE ELECTRIC METER READINGNo long text

<tbody>
</tbody><colgroup><col><col><col><col></colgroup>
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
If you are able to, I suggest you insert another column between H and I and put this formula in: '=CONCATENATE(G2,H2)', and on your sheet 2 a similar formula in a new column after column C. Then a lookup formula for the long text to lookup the concatenated data from column D in the sheet1 column I.
 
Upvote 0
A
B
C
D
E
F
G
H
I
J
1
GroupGroup CounterLong textGroupGroup CounterShort TextLong Text
2
1110000​
1​
A
1110000​
1​
CHECKCONDITIONA
3
1110000​
2​
B
1110000​
2​
WeeklysiteB
4
1110003​
1​
C
1154​
1​
TAKEELECTRIC
5
1110005​
1​
D
1154​
2​
TAKEELECTRIC
6
1110006​
1​
E
1154​
3​
TAKEELECTRIC
7
1110007​
1​
F
1154​
4​
TAKEELECTRIC
8
1110007​
1​
G
1154​
5​
TAKEELECTRIC
9
1110007​
1​
H
1154​
6​
TAKEELECTRIC
10
1110007​
1​
I
Sheet: Sheet22

Array formula in cell J2:
=INDEX($C$2:$C$10,MATCH(F2&"|"&G2,$A$2:$A$10&"|"&$B$2:$B$10,0))

How to enter an array formula
1. Copy formula
2. Double click on cell J2
3. Paste formula
4. Press and hold CTRL + SHIFT
5. Press Enter
 
Upvote 0

Forum statistics

Threads
1,215,601
Messages
6,125,758
Members
449,259
Latest member
rehanahmadawan

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