Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default IF and HLOOKUPFormula

I am trying to create a formula that combines If with
Lookup. Example.
Cell a1=1, a2=10, a3=20. The formula that I have in d1
is, =IF(HLOOKUP(A1,A1:A3,3)=0,(HLOOKUP(A1,A1:A3,3,
(HLOOKUP(A1,A1:A3,2))))). What I want the formula to do
is a LOOKUP and then return the value in a3 if it is
larger than 0 otherwise return the value in a2.

Help is always appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default IF and HLOOKUPFormula

First, HLookup is for horizontal lookup and you data is vertical

Second, you don't need to look up anything

=if(A30,A3,A2)

Should do what you describe.

--
Regards,
Tom Ogilvy


"Ronbo" wrote in message
...
I am trying to create a formula that combines If with
Lookup. Example.
Cell a1=1, a2=10, a3=20. The formula that I have in d1
is, =IF(HLOOKUP(A1,A1:A3,3)=0,(HLOOKUP(A1,A1:A3,3,
(HLOOKUP(A1,A1:A3,2))))). What I want the formula to do
is a LOOKUP and then return the value in a3 if it is
larger than 0 otherwise return the value in a2.

Help is always appreciated.
=



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default IF and HLOOKUPFormula

Hi
don't use VLOOKUP in this case. Try
=IF(A30,A3,A2)

--
Regards
Frank Kabel
Frankfurt, Germany


Ronbo wrote:
I am trying to create a formula that combines If with
Lookup. Example.
Cell a1=1, a2=10, a3=20. The formula that I have in d1
is, =IF(HLOOKUP(A1,A1:A3,3)=0,(HLOOKUP(A1,A1:A3,3,
(HLOOKUP(A1,A1:A3,2))))). What I want the formula to do
is a LOOKUP and then return the value in a3 if it is
larger than 0 otherwise return the value in a2.

Help is always appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default IF and HLOOKUPFormula


-----Original Message-----
I am trying to create a formula that combines If with
Lookup. Example.
Cell a1=1, a2=10, a3=20. The formula that I have in d1
is, =IF(HLOOKUP(A1,A1:A3,3)=0,(HLOOKUP(A1,A1:A3,3,
(HLOOKUP(A1,A1:A3,2))))). What I want the formula to do
is a LOOKUP and then return the value in a3 if it is
larger than 0 otherwise return the value in a2.

Help is always appreciated.

.
I have to use HLOOKUP. The example in A1 is just one

cell.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"