Welcome Guest.   Make a donation to an author on the site September 02, 2014, 11:54:09 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2010! Download 24 custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Excel If Then Statements  (Read 3927 times)
Mizraim
Supporting Member
**
Posts: 147



see users location on a map View Profile Give some DonationCredits to this forum member
« on: March 21, 2009, 11:10:01 AM »

I've searched a few sites for help on this matter, with no luck. So I figured I'd come ask you smart folks if you know what I'm doing wrong.
             
         
IF Cell D2 has the value "Fire" THEN Cell F2 receives "NW" AND Cell G2 receives "W", ELSE Put nothing in the box, shown in my code below

                    =if((D2="Fire"),F2="NW"&G2="W","")

However, I always get "False" Returned to the cell I put this code into.

There has to be something that I'm either missing or just doing wrong. Please help. Thanks in advance.
Logged

Mizraim
Supporting Member
**
Posts: 147



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #1 on: March 21, 2009, 11:43:03 AM »

I figured it out, thanks to the help from my brother. I was taking the IF statement out too far. In an IF, there can only be 3 parts, the STATEMENT, the TRUE and the FALSE. I was adding 4.

=IF(D2="Fire",            "NW",         IF(D2="Wind","SE","")) is correct,
          1                      2                       3

=IF(D2="Fire",            "NW",          "",             IF(D2="Wind",SE,"")) was incorrect
         1                       2             3                               4                         

However, I am still unable to edit multiple cells in the same statement...

This was done from Cell F2:

=IF(D2="Fire","NW"&G2="W",IF(D2=...

Now it fills the G2 Cell with W and leaves False in F2.

Any pointers?
« Last Edit: March 21, 2009, 11:48:11 AM by Mizraim » Logged

AndyM
Charter Member
***
Posts: 616


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #2 on: March 21, 2009, 07:41:54 PM »

Quote
However, I am still unable to edit multiple cells in the same statement...

This was done from Cell F2:

=IF(D2="Fire","NW"&G2="W",IF(D2=...

Now it fills the G2 Cell with W and leaves False in F2.

To have G2 display something using a formula, you have to put a formula in G2.  I can't see how a formula in F2 would "fill the G2 Cell with W" unless you had a formula in G2 testing for the contents of F2 or D2.

The only way something in F2 can change the contents of G2 independent of what's already in G2, like a formula, is with an event macro.
Logged
dasadler
Supporting Member
**
Posts: 1

View Profile Give some DonationCredits to this forum member
« Reply #3 on: March 21, 2009, 11:47:15 PM »

Try the following formulas:

In F2, type: =if(d2="fire","NW","")

In G2, type: =if(d2="fire","W","")
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.029s | Server load: 0.19 ]