Groups

    Anybody Good With Microsoft Excel?

    Anybody out there can help with an Excel spreadsheet? What I would like to do is create a formula which depending on a text entry adds or subtracts from the number in the cell above. For example in cell F7 the text is either "IN" or "OUT", if the text is "OUT" I want to add 1 to the number in cell G6, if the text is "IN" I want to subtract 1 from the number in cell G6, this formula would be for cell G7.

    Does that make sense and can anybody help? I've been playing around with formula for an hour or so and I can't get anything to work.

    4 Comments

    Would that not be "=IF" ?

    You need to use some kind of nested IF statement as above e.g.
    =IF(F7="IN",1,IF(F7="OUT",-1))

    an if always solves everything
    =IF(F7="out", G6+1,G6-1)
    that would work, even if F7 is gkkj then it still would do G6-1
    or
    =IF(F7="out",G6+1,IF(F7="in",G6-1,"error"))
    if you want a function that will only do those calculation when G7 is either out or in, otherwise it would say error.

    hold on did you want the number in G6 to be replaced by the new number? the IF statement above wont do that.

    Original Poster

    Cheers got it sorted thanks for your help.

    Rep for all.
    Post a comment
    Avatar
    @
      Text
      Top Discussions
      1. Ditched Sky1315
      2. What would be a Mario Kart type game for the PS4?33
      3. Best 40 inch TV for £30056
      4. Biscuit addiction1231

      See more discussions