Excel - Multiple actions for each part of IF statement?


  1. Posts : 13
    Windows 7 Home Premium 64bit
       #1

    Excel - Multiple actions for each part of IF statement?


    How would I accomplish the following in Excel 2010:

    IF (A=B, (action 1 & action 2), action 3)

    If A=B, execute both action 1 & action 2.
    If A not equal B, execute action 3.

    Thank you.
      My Computer


  2. Posts : 6,021
    Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
       #2

    Hi goshenBleeping,

    goshenBleeping said:
    How would I accomplish the following in Excel 2010:

    IF (A=B, (action 1 & action 2), action 3)

    If A=B, execute both action 1 & action 2.
    If A not equal B, execute action 3.
    Without an example of the parameters etc, you should be able to get an idea from this => =IF(A1=A2,(A1*2+A1*3),"x")

    I hope this helps!
      My Computer


  3. Posts : 13
    Windows 7 Home Premium 64bit
    Thread Starter
       #3

    Clearly I did a poor job of explaining my problem. None of the statements below work. Can someone suggest the correct syntax?

    I want to do the following:

    =IF(A1=2, B3=27, B3=4) ==> this sets cell B3=27 if cell A1=2, else sets cell B3=4: HOW to do this?

    Also

    =IF(A1=2, B3=27 & B4=16, B3=4)

    ==> this sets cells B3 and B4 if cell A1 = 2, else set cell B3=4: HOW to do this?
      My Computer


  4. Posts : 6,021
    Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
       #4

    Hi goshenBleeping,

    goshenBleeping said:
    I want to do the following:

    =IF(A1=2, B3=27, B3=4) ==> this sets cell B3=27 if cell A1=2, else sets cell B3=4: HOW to do this?
    =IF(A1=0,"No Figure In A1",IF(A1=2,27,4))

    I hope this helps!
      My Computer


  5. Posts : 6,021
    Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
       #5

    Hi goshenBleeping,

    goshenBleeping said:
    Also

    =IF(A1=2, B3=27 & B4=16, B3=4)

    ==> this sets cells B3 and B4 if cell A1 = 2, else set cell B3=4: HOW to do this?
    Seeing you are using a formula in cell B3, you cannot adjust cell B3 using another formula because it will give you a circular error!

    Your best bet in this situation would be to use a helper column.

    I hope this helps!
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:29.
Find Us