can you uses vlookup within an if statement, I can both functions to work
separately but not together.
Thanks
Alec
can you uses vlookup within an if statement, I can both functions to work
separately but not together.
Thanks
Alec
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
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,FALSE)
+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" <pashurst@auditel.net> wrote in message
news:1140634772.513173.93270@o13g2000cwo.googlegroups.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
>
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,FALSE)
> +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" <pashurst@auditel.net> wrote in message
> news:1140634772.513173.93270@o13g2000cwo.googlegroups.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
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
can you give me an example of the whole formula please
"Pete_UK" <pashurst@auditel.net> wrote in message
news:1140636795.089030.258000@o13g2000cwo.googlegroups.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
>
Ok, copying yours down from above:
=IF(A1="yes",VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FALSE)*1.2,
VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FALSE))
You had missed off a bracket at the end.
Hope this helps.
Pete
thanks!
"Pete_UK" <pashurst@auditel.net> wrote in message
news:1140637850.785603.298000@g14g2000cwa.googlegroups.com...
> Ok, copying yours down from above:
>
> =IF(A1="yes",VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FALSE)*1.2,
> VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FALSE))
>
> You had missed off a bracket at the end.
>
> Hope this helps.
>
> Pete
>
You're welcome.
Pete
I think I would have used:
=VLOOKUP(G3,PRODUCTS!$A$3:$D$311,2,FALSE)*if(a1="yes",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" <pashurst@auditel.net> wrote in message
> news:1140636795.089030.258000@o13g2000cwo.googlegroups.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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks