+ Reply to Thread
Results 1 to 4 of 4

2 IF Conditions

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    United Kingdom
    MS-Off Ver
    365
    Posts
    93

    2 IF Conditions

    Hi,

    I would like a formula so that the new cell returns a positive number for when I have "B" in column G even if I have a negative number for "B".

    Likewise when it is "S" I would like the new cell to return a negative number in both cases.

    So, in my example s/s: I would like to get the below output:

    Desired Result
    B 100 100
    S -89 -89
    S 10 -10
    B -5 5
    Attached Files Attached Files

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: 2 IF Conditions

    Try this

    =IF(G9="B",H9*SIGN(H9),IF(G9="S",-H9*SIGN(H9),H9))

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: 2 IF Conditions

    If column G can contain other values apart from "B" and "S", then you can use this formula:

    =IF(G9="B",ABS(H9),IF(G9="S",-ABS(H9),""))

    which will return a blank for any values that are not B or S. If column G can only be B or S, you could simplify it to this:

    =IF(G9="B",ABS(H9),-ABS(H9))

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    04-16-2013
    Location
    United Kingdom
    MS-Off Ver
    365
    Posts
    93

    Re: 2 IF Conditions

    Thanks a lot

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Help for IF conditions with multiple Conditions (scenario more than 5 conditions)
    By meily_o26 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-16-2019, 02:13 AM
  2. [SOLVED] Help combining macros to delete rows on conditions and add data into cells on conditions
    By JayJayGC in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-03-2017, 10:14 AM
  3. [SOLVED] Advanced Filter Between Two Columns all OR conditions (4 conditions)
    By nobodyukno in forum Excel General
    Replies: 2
    Last Post: 02-16-2017, 01:13 PM
  4. Replies: 2
    Last Post: 01-14-2016, 03:53 PM
  5. [SOLVED] Vlookup - Country conditions (Multiple conditions)
    By dluhut in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-26-2013, 11:42 AM
  6. [SOLVED] Text results with two conditions (lookup with two conditions)
    By Davzx in forum Excel General
    Replies: 8
    Last Post: 05-25-2012, 03:08 AM
  7. How to multiple conditions to validate more than 2 conditions to .
    By Bhuvana Govind in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-28-2005, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1