Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default How do I do an else if statement?

Hi! I am trying to write an IF statement to help out my boyfriend. I need a
statement that says IF( F47 J47, output first name, if not output second
name,) And I know how to do that part, but here's the kicker.... if the two
cells are the same value, then it needs to go look at two other cells and
determine which of those is greater.

Any help is appreciated!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I do an else if statement?


Something like:

=IF(F47=J47,MAX(X47,Z47),MAX(F47,J47))

change the X47 and Z47 to the other 2 cells you are comparing


--
Cutter
------------------------------------------------------------------------
Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848
View this thread: http://www.excelforum.com/showthread...hreadid=495311

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default How do I do an else if statement?

Melissa,
Something along these lines:

=IF(A1=B1,IF(A2B2,A2,B2),IF(A1B1,A1,B1))

If A1=B1 then test A2B2 otherwise test A1B1

HTH
"Melissa" wrote:

Hi! I am trying to write an IF statement to help out my boyfriend. I need a
statement that says IF( F47 J47, output first name, if not output second
name,) And I know how to do that part, but here's the kicker.... if the two
cells are the same value, then it needs to go look at two other cells and
determine which of those is greater.

Any help is appreciated!!!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default How do I do an else if statement?


"Melissa" wrote in message
...
Hi! I am trying to write an IF statement to help out my boyfriend. I
need a
statement that says IF( F47 J47, output first name, if not output second
name,) And I know how to do that part, but here's the kicker.... if the
two
cells are the same value, then it needs to go look at two other cells and
determine which of those is greater.

Any help is appreciated!!!


As a worsheet formula:

=IF(F47=J47, IF(F48J48, "First Name", "Second Name"), IF(F47J47, "First
Name", "Second Name"))


F48 and J48 need to be set whatever alternate cells you wish to compare. I
just picked those randomly.

-gk-


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default How do I do an else if statement?

Thank you all very much for your help!!! ALl of those solutions worked. Now
I have just one other question....if when F47 =J47 is there a way I can
output a name if there isn't anything to compare in the other two cells???



"Melissa" wrote:

Hi! I am trying to write an IF statement to help out my boyfriend. I need a
statement that says IF( F47 J47, output first name, if not output second
name,) And I know how to do that part, but here's the kicker.... if the two
cells are the same value, then it needs to go look at two other cells and
determine which of those is greater.

Any help is appreciated!!!



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default How do I do an else if statement?

Try:


=IF(A1=B1,IF(AND(A2="",B2=""),"Name here",IF(A2B2,A2,B2)),IF(A1B1,A1,B1))

"Melissa" wrote:

Thank you all very much for your help!!! ALl of those solutions worked. Now
I have just one other question....if when F47 =J47 is there a way I can
output a name if there isn't anything to compare in the other two cells???



"Melissa" wrote:

Hi! I am trying to write an IF statement to help out my boyfriend. I need a
statement that says IF( F47 J47, output first name, if not output second
name,) And I know how to do that part, but here's the kicker.... if the two
cells are the same value, then it needs to go look at two other cells and
determine which of those is greater.

Any help is appreciated!!!

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
IF statement inside a SUMIF statement.... or alternative method Sungibungi Excel Worksheet Functions 3 December 4th 09 06:22 PM
Reconcile Bank statement & Credit card statement & accounting data Bklynhyc Excel Worksheet Functions 0 October 7th 09 09:07 PM
Embedding an OR statement in an IF statement efficiently Chatnoir11 Excel Discussion (Misc queries) 4 February 2nd 09 08:12 PM
SUMIF statement with AND statement Eric D Excel Discussion (Misc queries) 2 July 14th 08 07:24 PM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM


All times are GMT +1. The time now is 12:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"