Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
can you uses vlookup within an if statement, I can both functions to work
separately but not together. Thanks Alec |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yes,you can use VLOOKUP( ) within an IF statement. Tell us what you
want to do and we might be able to help further. Pete |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
My VLookup is =VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FALSE)
and i'm trying to do something like this =IF(A1="yes",VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FAL SE) +20%,VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FALSE) basically if A1 is yes, then vlookup the value in products plus 20%, if A1 is not yes then just return the vlookup value Thanks! "Pete_UK" wrote in message ups.com... Yes,you can use VLOOKUP( ) within an IF statement. Tell us what you want to do and we might be able to help further. Pete |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You could use:
=if(a1="yes",1.2*vlookup(...),vlookup(...)) or maybe just: =vlookup(...)*if(a1="yes",1.2,1) Alec Green wrote: My VLookup is =VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FALSE) and i'm trying to do something like this =IF(A1="yes",VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FAL SE) +20%,VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FALSE) basically if A1 is yes, then vlookup the value in products plus 20%, if A1 is not yes then just return the vlookup value Thanks! "Pete_UK" wrote in message ups.com... Yes,you can use VLOOKUP( ) within an IF statement. Tell us what you want to do and we might be able to help further. Pete -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yes, you can't just add 20% to the value returned by the vlookup as you
are trying to do, you have to multiply this value by 1.2 (i.e. 120%) as Dave suggests. Pete |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
can you give me an example of the whole formula please
"Pete_UK" wrote in message oups.com... Yes, you can't just add 20% to the value returned by the vlookup as you are trying to do, you have to multiply this value by 1.2 (i.e. 120%) as Dave suggests. Pete |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Ok, copying yours down from above:
=IF(A1="yes",VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FAL SE)*1.2, VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FALSE)) You had missed off a bracket at the end. Hope this helps. Pete |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
thanks!
"Pete_UK" wrote in message oups.com... Ok, copying yours down from above: =IF(A1="yes",VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FAL SE)*1.2, VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FALSE)) You had missed off a bracket at the end. Hope this helps. Pete |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You're welcome.
Pete |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I think I would have used:
=VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FALSE)*if(a1="y es",1.2,1) I think it's easier to understand (and it does less stuff). Alec Green wrote: can you give me an example of the whole formula please "Pete_UK" wrote in message oups.com... Yes, you can't just add 20% to the value returned by the vlookup as you are trying to do, you have to multiply this value by 1.2 (i.e. 120%) as Dave suggests. Pete -- Dave Peterson |
#11
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yeah, I thought about putting that version for the OP as well, but then
he already had the other one so it would be easier for him to edit that (only 4 characters needed changing, plus his missing bracket). Pete |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using single cell reference as table array argument in Vlookup | Excel Worksheet Functions | |||
VLOOKUP Limitations | Excel Worksheet Functions | |||
Have Vlookup return a Value of 0 instead of #N/A | Excel Worksheet Functions | |||
vlookup data hidden within worksheet | Excel Worksheet Functions | |||
Vlookup info being used without vlookup table attached? | Excel Worksheet Functions |