|
|
Question : HLOOKUP newbie question
|
|
Hi
I am new to working with HLOOKUP and VLOOKUP and find the examples given within Excel to be rather confusing and cumbersome. I have a worksheet as follows:
A B C D E F G H I J K L 1 105 106 107 108 109 110 111 112 2 start end 3 107 p 4 110 p 5 108 110 p q
There can only be one occurance of a 'p' entered per row. Once the 'p' is entered, I want a formula in the corresponding B column to display the contents of Row 1 data above the 'p' that has been entered by the user.
What formula can I use to achieve this? Likewise, if a 'p' is entered in one column, and a 'q' entered further on, can I achieve what is demonstrated in row 5 above (and is it possible to make the rows h5 -> j5 highlighted in a separate colour, if a p and q are entered).
I realise I am asking multiple questions here, but will award the points to anyone who can answer the first and most pressing question.
|
Answer : HLOOKUP newbie question
|
|
try selecting e3:L5 then use this for the Formula Is
=AND(COUNTIF($E3:$L3,"p")=1,COUNTIF($E3:$L3,"q")=1,COLUMN(F3)>=MATCH("p",3:3,0),COLUMN(F3)<=MATCH("q",3:3,0))
Cheers
Dave
|
|
|
|
|