Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am importing data by using .txt file to MS Excel and whole data is imported in ONE ROW. I want to get SUM of those values which corresponds to a particular Month. For Example :-

Name Month Total Value  
Mark Jan     2000  
Mark Jan     1500  
Mark Feb     2900  
Mark Feb     3000  

I want to get the TOTAL value in the Month Jan in a particular Cell.

Kindly tell me how to proceed. NOTE: Whole data is imported in one ROW only. So the formula should add automatically those values which it finds out on the row.

share|improve this question
Not sure how your data file is formatted, but have you tried importing the data in a more user friendly format to run calculations? For instance, using a delimiter to import which would put the data into columns under the headings Name, Month and Total Value. – CharlieRB Oct 25 '12 at 11:42

I know this is a really old question, but hopefully this is useful to someone.

If the data is on one row, you can use the following formula (stretch the columns in the formula as required)


The first term is the range to check for the month, so it's the full data set. The middle term is the name of the month (I hope you don't have any people in your organisation called Jan/April/May/June or else you will get wrong results!). The final term is the same range as the first term, but shifted one column to the right (because the value is always in the column directly after the name)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .