New to Microsoft Excel, have a question

Discussion in 'Archived Threads 2001-2004' started by Vince Maskeeper, Feb 16, 2002.

  1. Vince Maskeeper

    Vince Maskeeper Producer

    Joined:
    Jan 18, 1999
    Messages:
    6,499
    Likes Received:
    0
    I haven't been a serious spreadsheet user in maybe 10 years... and then I got my feet wet with Excel for win 3.1. Needless to say, I'm a bit of a neophyte.
    I have dusted off my Office 2000 Excel in order to automate some math in a stock project I'm doing for a finance course. I have gotten all the super basic done (formatting, summing lists of numbers, multiplication, running changes from previous week, etc)... however I came across something I'd like to do that and I cannot find any info.
    I would like to use an If/Then logical conditional... Pretty basic stuff: Put in the condition and the actions for True/False.
    BUT, What I want to do is have it compare two cells, and determine if there has been a gain or a loss (Sum c3,-c2>0) and if it is a loss I would like to have it format the cell which shows the loss with a red background.
    Ah-ha. Didn't see that coming now did you? I can get it to return text or even values based upon the if/then conditionals- but I thought it would be common sense that they would include if/then formatting (like "If value is greater than 500, make it bold" or maybe "If the sum of this series of digits is less than this value, make the whole line blue"... for example).
    Was Microsoft smart enough to include such an option? If so, can someone explain the syntax, or point me to a site which can explain it?
    -Vince
     
  2. Greg_Y

    Greg_Y Screenwriter

    Joined:
    Mar 7, 1999
    Messages:
    1,466
    Likes Received:
    0
    Conditional Formatting under the Format menu should give you what you want. I'm not an Excel expert, but with some trial and error, I can usually get it to work just as I want it.
     
  3. Vince Maskeeper

    Vince Maskeeper Producer

    Joined:
    Jan 18, 1999
    Messages:
    6,499
    Likes Received:
    0
    Thanks Greg!

    Got it figured out.

    -V
     
  4. Mike St.Louis

    Mike St.Louis Supporting Actor

    Joined:
    Sep 22, 1999
    Messages:
    518
    Likes Received:
    0
    To get the number to show up as red when it is negative you just format the cell as a number and you will see different options for displaying a negative number (ie (300),-300,300).

    I don't think you would even need to use the IF function to do what you want. Just put the formula in the cell to take the difference and format the cell as described above.
     
  5. Vince Maskeeper

    Vince Maskeeper Producer

    Joined:
    Jan 18, 1999
    Messages:
    6,499
    Likes Received:
    0
    Gotcha. Well, I specifically wanted the background of the cell to be red, just so I could see at a glance which stocks were winners and which were losers.

    Also, since I wasn't actually calculating the difference on the sheet- no negative numbers were every displayed in print anywhere. I didn't actually have a field with the weekly differences as a number, instead I had:

    1/25/02 > 50666.94

    2/1/02 > 47304.09

    2/8/02 > 44987.46

    I wanted it to check each cell against the previous week's numbers and if it was a loss, then flag the cell as red if it was, grey if it wasn't.

    But that negative number display thing you suggested might come in handy in the future... it's amazing what this program has built into it!

    -Vince
     

Share This Page