A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can a VLookup be added to an IF Statement?



 
 
Thread Tools Display Modes
  #1  
Old June 4th, 2009, 04:57 PM posted to microsoft.public.excel.misc
Kiley
external usenet poster
 
Posts: 39
Default Can a VLookup be added to an IF Statement?

I have an IF statement and I am wondering if a Vlookup can be added to the
formula?
  #2  
Old June 4th, 2009, 05:06 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default Can a VLookup be added to an IF Statement?

Yes, but you'll need to provide some details on what the formula is supposed
to do.

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
I have an IF statement and I am wondering if a Vlookup can be added to the
formula?



  #3  
Old June 4th, 2009, 06:10 PM posted to microsoft.public.excel.misc
David Biddulph
external usenet poster
 
Posts: 8,714
Default Can a VLookup be added to an IF Statement?

Yes.

For example =IF(A1=1,VLOOKUP(...),"something else") or
=IF(VLOOKUP(...)=A1,B1,C1)
--
David Biddulph

"Kiley" wrote in message
...
I have an IF statement and I am wondering if a Vlookup can be added to the
formula?



  #4  
Old June 8th, 2009, 04:17 PM posted to microsoft.public.excel.misc
Kiley
external usenet poster
 
Posts: 39
Default Can a VLookup be added to an IF Statement?

This what my IF statement looks like. I want to pull this information for a
particular employees using Employee ID as the lookup value. Let me know if
you need more information. Thank you.

"T. Valko" wrote:

Yes, but you'll need to provide some details on what the formula is supposed
to do.

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
I have an IF statement and I am wondering if a Vlookup can be added to the
formula?




  #5  
Old June 8th, 2009, 05:55 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default Can a VLookup be added to an IF Statement?

Not enough info.

Tell us what it is you're looking for. Where do we look for it? See if this
helps:

...........A..........B
1........x..........north
2........y..........south
3........z..........east

D1 = y

=VLOOKUP(D1,A1:B3,2,0)

Result = south

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
This what my IF statement looks like. I want to pull this information for
a
particular employees using Employee ID as the lookup value. Let me know
if
you need more information. Thank you.

"T. Valko" wrote:

Yes, but you'll need to provide some details on what the formula is
supposed
to do.

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
I have an IF statement and I am wondering if a Vlookup can be added to
the
formula?






  #6  
Old June 8th, 2009, 06:27 PM posted to microsoft.public.excel.misc
Kiley
external usenet poster
 
Posts: 39
Default Can a VLookup be added to an IF Statement?

Sorry, I did not include what the IF statement. Here it is:

I am pulling in information from another workbook that is look at three sets
of data and I need to grab the one that ="y". That is how the IF statement
is set up. What I want to do is look at this IF statement for a a particular
employee. So, for example, I want to do a vlookup for employee number 12345
and apply the IF statement. Let me know if you still need more information.
Thank you.


=IF('K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet _04_30_09.xls]officer
data'!$AW$4="y",'K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet
_04_30_09.xls]officer data'!$AS$4,IF('K:\COMP\Mary\[TEMPLATE Off Mrt Summary
Sheet _04_30_09.xls]officer data'!$BD$4="y",'K:\COMP\Mary\[TEMPLATE Off Mrt
Summary Sheet _04_30_09.xls]officer data'!$AZ$4,IF('K:\COMP\Mary\[TEMPLATE
Off Mrt Summary Sheet _04_30_09.xls]officer
data'!$BK$4="y",'K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet
_04_30_09.xls]officer data'!$BG$4,"")))/1000


"T. Valko" wrote:

Not enough info.

Tell us what it is you're looking for. Where do we look for it? See if this
helps:

...........A..........B
1........x..........north
2........y..........south
3........z..........east

D1 = y

=VLOOKUP(D1,A1:B3,2,0)

Result = south

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
This what my IF statement looks like. I want to pull this information for
a
particular employees using Employee ID as the lookup value. Let me know
if
you need more information. Thank you.

"T. Valko" wrote:

Yes, but you'll need to provide some details on what the formula is
supposed
to do.

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
I have an IF statement and I am wondering if a Vlookup can be added to
the
formula?






  #7  
Old June 8th, 2009, 07:00 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default Can a VLookup be added to an IF Statement?

I don't see how VLOOKUP comes into play here. For one thing, VLOOKUP
searches to the right. Your formula is "searching" to the left.

There's nothing wrong with your formula other than it being kind of long due
to the extremely long file name.

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
Sorry, I did not include what the IF statement. Here it is:

I am pulling in information from another workbook that is look at three
sets
of data and I need to grab the one that ="y". That is how the IF
statement
is set up. What I want to do is look at this IF statement for a a
particular
employee. So, for example, I want to do a vlookup for employee number
12345
and apply the IF statement. Let me know if you still need more
information.
Thank you.


=IF('K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet _04_30_09.xls]officer
data'!$AW$4="y",'K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet
_04_30_09.xls]officer data'!$AS$4,IF('K:\COMP\Mary\[TEMPLATE Off Mrt
Summary
Sheet _04_30_09.xls]officer data'!$BD$4="y",'K:\COMP\Mary\[TEMPLATE Off
Mrt
Summary Sheet _04_30_09.xls]officer data'!$AZ$4,IF('K:\COMP\Mary\[TEMPLATE
Off Mrt Summary Sheet _04_30_09.xls]officer
data'!$BK$4="y",'K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet
_04_30_09.xls]officer data'!$BG$4,"")))/1000


"T. Valko" wrote:

Not enough info.

Tell us what it is you're looking for. Where do we look for it? See if
this
helps:

...........A..........B
1........x..........north
2........y..........south
3........z..........east

D1 = y

=VLOOKUP(D1,A1:B3,2,0)

Result = south

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
This what my IF statement looks like. I want to pull this information
for
a
particular employees using Employee ID as the lookup value. Let me
know
if
you need more information. Thank you.

"T. Valko" wrote:

Yes, but you'll need to provide some details on what the formula is
supposed
to do.

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
I have an IF statement and I am wondering if a Vlookup can be added
to
the
formula?








  #8  
Old June 8th, 2009, 08:22 PM posted to microsoft.public.excel.misc
Kiley
external usenet poster
 
Posts: 39
Default Can a VLookup be added to an IF Statement?

I want to add a vlookup to this IF statement. I am pulling in information
from another workbook that is looking at three sets of data and I need to
grab the one that ="y". That is how the IF statement is set up. What I want
to do is look at this IF statement for a particular employee. So, for
example, I want to do a vlookup for employee number 12345 and apply the IF
statement. Let me know if you still need more information.


"T. Valko" wrote:

I don't see how VLOOKUP comes into play here. For one thing, VLOOKUP
searches to the right. Your formula is "searching" to the left.

There's nothing wrong with your formula other than it being kind of long due
to the extremely long file name.

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
Sorry, I did not include what the IF statement. Here it is:

I am pulling in information from another workbook that is look at three
sets
of data and I need to grab the one that ="y". That is how the IF
statement
is set up. What I want to do is look at this IF statement for a a
particular
employee. So, for example, I want to do a vlookup for employee number
12345
and apply the IF statement. Let me know if you still need more
information.
Thank you.


=IF('K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet _04_30_09.xls]officer
data'!$AW$4="y",'K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet
_04_30_09.xls]officer data'!$AS$4,IF('K:\COMP\Mary\[TEMPLATE Off Mrt
Summary
Sheet _04_30_09.xls]officer data'!$BD$4="y",'K:\COMP\Mary\[TEMPLATE Off
Mrt
Summary Sheet _04_30_09.xls]officer data'!$AZ$4,IF('K:\COMP\Mary\[TEMPLATE
Off Mrt Summary Sheet _04_30_09.xls]officer
data'!$BK$4="y",'K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet
_04_30_09.xls]officer data'!$BG$4,"")))/1000


"T. Valko" wrote:

Not enough info.

Tell us what it is you're looking for. Where do we look for it? See if
this
helps:

...........A..........B
1........x..........north
2........y..........south
3........z..........east

D1 = y

=VLOOKUP(D1,A1:B3,2,0)

Result = south

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
This what my IF statement looks like. I want to pull this information
for
a
particular employees using Employee ID as the lookup value. Let me
know
if
you need more information. Thank you.

"T. Valko" wrote:

Yes, but you'll need to provide some details on what the formula is
supposed
to do.

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
I have an IF statement and I am wondering if a Vlookup can be added
to
the
formula?









  #9  
Old June 8th, 2009, 09:21 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default Can a VLookup be added to an IF Statement?

I'm not following you on this.

A lookup formula usually searches a table but your IF formula is looking at
single cells. Here's your IF formula reduced to just the cell references:

=IF(AW4="y",AS4,IF(BD4="y",AZ4,IF(BK4="y",BG4,"")) )/1000

Refer back to my other reply where I posted a sample lookup table.

You say you want to lookup an employee number. Where is this employee
number? And, if the employee number is found where is the data that you want
returned? How does this relate to tour IF formula? You have to be *VERY
SPECIFIC* and provide the details.


--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
I want to add a vlookup to this IF statement. I am pulling in information
from another workbook that is looking at three sets of data and I need to
grab the one that ="y". That is how the IF statement is set up. What I
want
to do is look at this IF statement for a particular employee. So, for
example, I want to do a vlookup for employee number 12345 and apply the IF
statement. Let me know if you still need more information.


"T. Valko" wrote:

I don't see how VLOOKUP comes into play here. For one thing, VLOOKUP
searches to the right. Your formula is "searching" to the left.

There's nothing wrong with your formula other than it being kind of long
due
to the extremely long file name.

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
Sorry, I did not include what the IF statement. Here it is:

I am pulling in information from another workbook that is look at three
sets
of data and I need to grab the one that ="y". That is how the IF
statement
is set up. What I want to do is look at this IF statement for a a
particular
employee. So, for example, I want to do a vlookup for employee number
12345
and apply the IF statement. Let me know if you still need more
information.
Thank you.


=IF('K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet _04_30_09.xls]officer
data'!$AW$4="y",'K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet
_04_30_09.xls]officer data'!$AS$4,IF('K:\COMP\Mary\[TEMPLATE Off Mrt
Summary
Sheet _04_30_09.xls]officer data'!$BD$4="y",'K:\COMP\Mary\[TEMPLATE Off
Mrt
Summary Sheet _04_30_09.xls]officer
data'!$AZ$4,IF('K:\COMP\Mary\[TEMPLATE
Off Mrt Summary Sheet _04_30_09.xls]officer
data'!$BK$4="y",'K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet
_04_30_09.xls]officer data'!$BG$4,"")))/1000


"T. Valko" wrote:

Not enough info.

Tell us what it is you're looking for. Where do we look for it? See if
this
helps:

...........A..........B
1........x..........north
2........y..........south
3........z..........east

D1 = y

=VLOOKUP(D1,A1:B3,2,0)

Result = south

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
This what my IF statement looks like. I want to pull this
information
for
a
particular employees using Employee ID as the lookup value. Let me
know
if
you need more information. Thank you.

"T. Valko" wrote:

Yes, but you'll need to provide some details on what the formula is
supposed
to do.

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
I have an IF statement and I am wondering if a Vlookup can be
added
to
the
formula?











  #10  
Old June 9th, 2009, 02:16 PM posted to microsoft.public.excel.misc
Kiley
external usenet poster
 
Posts: 39
Default Can a VLookup be added to an IF Statement?

I have a workbook with a set of data which includes employee ID numbers, and
then three sets of data for each employee. Each set of data is identified
with a "y" or a "n". The IF statement (which is set up in another workbook)
is set up to pull the set of data that has been identified with a "y". My
goal is to be able to add a vlookup to the IF statement using employee ID
number to pull the "y" set of data for a particular employee. I would send
you what my data looks like, but I do not know if there is an option to
attach documents here. You help an patience is greatly appreciated.

"T. Valko" wrote:

I'm not following you on this.

A lookup formula usually searches a table but your IF formula is looking at
single cells. Here's your IF formula reduced to just the cell references:

=IF(AW4="y",AS4,IF(BD4="y",AZ4,IF(BK4="y",BG4,"")) )/1000

Refer back to my other reply where I posted a sample lookup table.

You say you want to lookup an employee number. Where is this employee
number? And, if the employee number is found where is the data that you want
returned? How does this relate to tour IF formula? You have to be *VERY
SPECIFIC* and provide the details.


--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
I want to add a vlookup to this IF statement. I am pulling in information
from another workbook that is looking at three sets of data and I need to
grab the one that ="y". That is how the IF statement is set up. What I
want
to do is look at this IF statement for a particular employee. So, for
example, I want to do a vlookup for employee number 12345 and apply the IF
statement. Let me know if you still need more information.


"T. Valko" wrote:

I don't see how VLOOKUP comes into play here. For one thing, VLOOKUP
searches to the right. Your formula is "searching" to the left.

There's nothing wrong with your formula other than it being kind of long
due
to the extremely long file name.

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
Sorry, I did not include what the IF statement. Here it is:

I am pulling in information from another workbook that is look at three
sets
of data and I need to grab the one that ="y". That is how the IF
statement
is set up. What I want to do is look at this IF statement for a a
particular
employee. So, for example, I want to do a vlookup for employee number
12345
and apply the IF statement. Let me know if you still need more
information.
Thank you.


=IF('K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet _04_30_09.xls]officer
data'!$AW$4="y",'K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet
_04_30_09.xls]officer data'!$AS$4,IF('K:\COMP\Mary\[TEMPLATE Off Mrt
Summary
Sheet _04_30_09.xls]officer data'!$BD$4="y",'K:\COMP\Mary\[TEMPLATE Off
Mrt
Summary Sheet _04_30_09.xls]officer
data'!$AZ$4,IF('K:\COMP\Mary\[TEMPLATE
Off Mrt Summary Sheet _04_30_09.xls]officer
data'!$BK$4="y",'K:\COMP\Mary\[TEMPLATE Off Mrt Summary Sheet
_04_30_09.xls]officer data'!$BG$4,"")))/1000


"T. Valko" wrote:

Not enough info.

Tell us what it is you're looking for. Where do we look for it? See if
this
helps:

...........A..........B
1........x..........north
2........y..........south
3........z..........east

D1 = y

=VLOOKUP(D1,A1:B3,2,0)

Result = south

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
This what my IF statement looks like. I want to pull this
information
for
a
particular employees using Employee ID as the lookup value. Let me
know
if
you need more information. Thank you.

"T. Valko" wrote:

Yes, but you'll need to provide some details on what the formula is
supposed
to do.

--
Biff
Microsoft Excel MVP


"Kiley" wrote in message
...
I have an IF statement and I am wondering if a Vlookup can be
added
to
the
formula?












 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:37 AM.


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