We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Excel 'IF' function

Hi guys

I'd like to have Excel add three bits of data, 'S', 'I' and 'H', from columns, so I can see how many of each were used for each month.

Have thought of using the 'IF' function, but can't see how to get it to work on this.

Many thanks
Baby-Mechanic

The only reason I keep smiling is so that people wonder what I've been up to !!

Comments

  • lazer
    lazer Posts: 3,402 Forumite
    Hi,

    If you're just adding 3 colums of Data, all you need is a simple addition formula

    eg: = S1+I1+H1

    Can you clairfy what you need the formula to do?
    Weight loss challenge, lose 15lb in 6 weeks before Christmas.
  • googler
    googler Posts: 16,103 Forumite
    Part of the Furniture 10,000 Posts Name Dropper Combo Breaker
    or SUM(Cell1,Cell2,Cell3) to give you a total of three cells.

    Again, what are you trying to do?
  • Thought I'd explained it better than i had !

    In a column that is representing a month, I will have several cells containg the letter 'S', several with 'I', and several with 'H'.

    I'd like to be able to set up a function that will total the number of each of these letters in the column.

    I realise that i will probably need three separate functions
    Baby-Mechanic

    The only reason I keep smiling is so that people wonder what I've been up to !!
  • sprouter
    sprouter Posts: 71 Forumite
    edited 30 August 2011 at 3:06PM
    Do the cells you are analysing only contain either S, I or H? If so, the COUNTIF function sounds like the one you want. SUMIF might also be appropriate if you're looking to add the amounts according to the criteria selected. If the cells contain more than S, I, H, then you'll probably also want to combine the above function with the LEFT() function (assuming the S, I , H always appear as the first character).
    Jeez - I see what you mean about trying to explain it!
  • rmg1
    rmg1 Posts: 3,159 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    In three separate cells, you can use the Countif function.
    The syntax would be :-
    =COUNTIF(H:H,"S")
    =COUNTIF(H:H,"I")
    =COUNTIF(H:H,"H")

    This will simply count the number of times each letter appears in the column (always assuming it's the only letter in the cell).
    :wall: Flagellation, necrophilia and bestiality - Am I flogging a dead horse? :wall:

    Any posts are my opinion and only that. Please read at your own risk.
  • yes, the is only one letter in each cell, either 'S', 'I' or 'H', and I'm grateful for the ability too count them.

    rmg1 - what does the 'H:H,' part represent ?
    especially if I'm assessing a column of up to 31 cells ?
    Baby-Mechanic

    The only reason I keep smiling is so that people wonder what I've been up to !!
  • Hi rmg1

    have worked out the answer to my question to you

    many thanks folks
    Baby-Mechanic

    The only reason I keep smiling is so that people wonder what I've been up to !!
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 351.7K Banking & Borrowing
  • 253.4K Reduce Debt & Boost Income
  • 454K Spending & Discounts
  • 244.7K Work, Benefits & Business
  • 600.1K Mortgages, Homes & Bills
  • 177.3K Life & Family
  • 258.4K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.2K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.