ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If or formula (https://www.excelbanter.com/excel-discussion-misc-queries/265122-if-formula.html)

Susan

If or formula
 
Trying to create a formula that will do the following:

If a1="1", then vlookup ...........or if A1="2" then vlookup......



Gord Dibben

If or formula
 
Not enough information.

Vlookup what?

Where would this formula be entered?

Let's say for example we had Gord in B1

In C1 we enter =IF(A1=1,VLOOKUP(B1,table,colndx,false),"not equal 1")


Gord Dibben MS Excel MVP


On Wed, 2 Jun 2010 19:19:31 -0700, Susan
wrote:

Trying to create a formula that will do the following:

If a1="1", then vlookup ...........or if A1="2" then vlookup......



John[_22_]

If or formula
 
Maybe this ; =IF(OR(A1=1,A1=2),vlookup,"")
This is just a example : =IF(OR(A1=1,A1=2),VLOOKUP(B1,C1:D12,2,FALSE),"")
You don't say what you want if no match, so I put "", this will leave the cell
blank.
If you put double quotes around your numbers, it will tell excel that those
numbers are text, not numbers.
HTH
John
"Susan" wrote in message
...
Trying to create a formula that will do the following:

If a1="1", then vlookup ...........or if A1="2" then vlookup......





All times are GMT +1. The time now is 03:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com