+ Reply to Thread
Results 1 to 6 of 6

Excel If statement to make given Column a negative value

  1. #1
    Registered User
    Join Date
    05-08-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    3

    Smile Excel If statement to make given Column a negative value

    Hi,
    I am trying to create a formula in excel to make a given column a negative number.
    The example used is:
    I have two columns A and B
    Column A has text in it so Peter, John, David, Liam
    Column B has numbers in it and so 10, 20, 40, 60, 80

    The formula I need is: If Column A = Peter, John make Column B a negative number in red
    so something like =IF((A1-A15)="Peter","John" Then ((B1-B100=-....))

    Hope you can help
    Last edited by ExcelITtroubleshoot; 05-08-2013 at 05:52 AM.

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: Excel If statement to make given Column a negative value

    With a formula you need another cel/column:
    =if(or(a1="peter",a1="john")=b1*-1,b1)
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Excel If statement to make given Column a negative value

    Please provide a sample sheet showing requested result

  4. #4
    Registered User
    Join Date
    05-08-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Excel If statement to make given Column a negative value

    Thanks guys:

    Here is a finished sheet attached. Paul and John are the variables that would make the second column a minus figure
    Attached Files Attached Files

  5. #5
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Excel If statement to make given Column a negative value

    Hi ExcelITtroubleshoot

    In C1 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Select C1:C8, conditional formatting on the home tab and the rule: =$C1<0 format as required.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  6. #6
    Registered User
    Join Date
    05-08-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Excel If statement to make given Column a negative value

    Thanks Kevin,

    works perfectly!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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