#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default If Question

I am trying to get information based on a name. I tried the following
formula, but can not get it to work. Please help. Thanks.
Johnnie

In cell B7 I have the following:

=IF(B3=Brian,Sheet2!E2,if(B3=Cindy,Sheet2!E3,if(B3 =David,Sheet2!E4,"")

Note: Cell B3 is a list.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default If Question

Try putting double quotes around the names:

=IF(B3="Brian",......

--
Biff
Microsoft Excel MVP


"Johnnie" wrote in message
...
I am trying to get information based on a name. I tried the following
formula, but can not get it to work. Please help. Thanks.
Johnnie

In cell B7 I have the following:

=IF(B3=Brian,Sheet2!E2,if(B3=Cindy,Sheet2!E3,if(B3 =David,Sheet2!E4,"")

Note: Cell B3 is a list.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,071
Default If Question

Try putting the names in quotes, "Brian", "Cindy", "David". HTH Otto
"Johnnie" wrote in message
...
I am trying to get information based on a name. I tried the following
formula, but can not get it to work. Please help. Thanks.
Johnnie

In cell B7 I have the following:

=IF(B3=Brian,Sheet2!E2,if(B3=Cindy,Sheet2!E3,if(B3 =David,Sheet2!E4,"")

Note: Cell B3 is a list.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default If Question

If you have only three names then you are on the right track..you need to put
quotes around names (text strings)

Try

=IF(B3="Brian",Sheet2!E2,if(B3="Cindy",Sheet2!E3,i f(B3="David",Sheet2!E4,"")))


"Johnnie" wrote:

I am trying to get information based on a name. I tried the following
formula, but can not get it to work. Please help. Thanks.
Johnnie

In cell B7 I have the following:

=IF(B3=Brian,Sheet2!E2,if(B3=Cindy,Sheet2!E3,if(B3 =David,Sheet2!E4,"")

Note: Cell B3 is a list.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default If Question

Hi,

very close, instead use

=IF(B3="Brian",Sheet2!E2,if(B3="Cindy",Sheet2!E3,i f(B3="David",Sheet2!E4,"")))


--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Johnnie" wrote:

I am trying to get information based on a name. I tried the following
formula, but can not get it to work. Please help. Thanks.
Johnnie

In cell B7 I have the following:

=IF(B3=Brian,Sheet2!E2,if(B3=Cindy,Sheet2!E3,if(B3 =David,Sheet2!E4,"")

Note: Cell B3 is a list.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default If Question

Shane,
Thanks, it works great. Two questions:
1. Do the names require the quotes because I am pulling them from a list and
2. How long can the string be? I have 35 names to incorporate into the
formula.

Johnnie

"Shane Devenshire" wrote:

Hi,

very close, instead use

=IF(B3="Brian",Sheet2!E2,if(B3="Cindy",Sheet2!E3,i f(B3="David",Sheet2!E4,"")))


--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Johnnie" wrote:

I am trying to get information based on a name. I tried the following
formula, but can not get it to work. Please help. Thanks.
Johnnie

In cell B7 I have the following:

=IF(B3=Brian,Sheet2!E2,if(B3=Cindy,Sheet2!E3,if(B3 =David,Sheet2!E4,"")

Note: Cell B3 is a list.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default If Question

The names need to be in quotes because that is how Excel denotes a text
string.
If rather than "How long can the string be?" you intended to ask how many IF
statements can be nested together in this way, the answer is only 7 for
Excel 2003. If you've got more than that the recommendation is usually to
use the VLOOKUP function instead of nested IFs. Excel help will give you
examples as to how to use VLOOKUP, and there are plenty of recommendations
in the archive of this newsgroup.
--
David Biddulph

"Johnnie" wrote in message
...
Shane,
Thanks, it works great. Two questions:
1. Do the names require the quotes because I am pulling them from a list
and
2. How long can the string be? I have 35 names to incorporate into the
formula.

Johnnie

"Shane Devenshire" wrote:

Hi,

very close, instead use

=IF(B3="Brian",Sheet2!E2,if(B3="Cindy",Sheet2!E3,i f(B3="David",Sheet2!E4,"")))


--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Johnnie" wrote:

I am trying to get information based on a name. I tried the following
formula, but can not get it to work. Please help. Thanks.
Johnnie

In cell B7 I have the following:

=IF(B3=Brian,Sheet2!E2,if(B3=Cindy,Sheet2!E3,if(B3 =David,Sheet2!E4,"")

Note: Cell B3 is a list.



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
VBA Question Farhad Excel Discussion (Misc queries) 3 September 12th 07 04:42 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM
My first question! Deadloss Excel Discussion (Misc queries) 10 December 23rd 05 05:41 AM


All times are GMT +1. The time now is 07:23 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"