View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default Please help with a formula

Small version:
=INDEX(G1:M1,MATCH("A",G2:M2,0))

If there's a possibility of "A" not being found:
=IF(COUNTIF(G2:M2,"A"),INDEX(G1:M1,MATCH("A",G2:M2 ,0)),"")
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Accesshelp" wrote:

Hello all,

I need help with a formula that is similar to vlookup or hlookup.

In my Excel file, I have various values in cells from G2 to M2 and in cells
from G1 to M1. I am looking for a formula that if any of the values in G2 to
M2 is "A", give the value from the cell above. For example, if I2 has a
value of "A", the formula will give me the value from cell I1.

The problem that I am having is if I want to pick up the value from the cell
below (e.g. I3), I can use the Hlookup formula like this
"hlookup("A",$G$2:$M$2,2,false), but in my current situation, I am looking up
the value, instead of looking down.

Thanks.