Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7850985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:03:26+00:00 2026-06-02T19:03:26+00:00

I have a simple excel spreadsheet that is a daily updated list of counters.

  • 0

I have a simple excel spreadsheet that is a daily updated list of counters. The format of the sheet is as follows:

A         B          C             D          E
date      name       computer      info       counter

Example:

A             B          C         D              E
04/04/2012    John       186       Workstation    4813
04/04/2012    Mary       181       Workstation    2273
04/05/2012    John       186       Workstation    4822
04/05/2012    Mary       181       Workstation    2274
04/06/2012    John       186       Workstation    4854
04/06/2012    Mary       181       Workstation    2275
04/06/2012    Bill       183       Workstation    3698

and son on….

What I need to be able to do is combine all like cells. So for instance combine all of the rows for each month and subtract the last E column from the first one so it it would look like the following in a new sheet.

A             B          C         D              E
April 2012    John       186       Workstation    41
April 2012    Mary       181       Workstation    2
April 2012    Bill       183       Workstation    0

and so on for each one…keeping in mind this is updated daily and have many days, months and years.

I have no idea how to even think about doing this but I assume I would need a macro. If anyone has any assistance that would be great!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:03:29+00:00Added an answer on June 2, 2026 at 7:03 pm

    Assuming this is what you want to do

    I have spent some time on this, and it feels like I have finally got what you need. I would have uploaded a sample file, but file sharing sites are blocked here :).

    Now I know, you want your output in a different tab, but bear with me on this for now.

    The following solution is lengthy (expected because of the nature of your question). Follow what is done here to the T, and don’t care about intermediate errors that might popup in some cells, it will all be sorted out in some time.

    I am assuming your sheet looks like yellow part of the image. (Never mind the dates in the first column, they are all April 2012 dates, that’s what matters.)

    In cell F2, paste the following formula

    =IF(A2="","",MONTH(A2))

    In cell G2, paste the following formula,

    =IF(A2="","",YEAR(A2))

    In cell H2, paste the following formula,

    =IF(B2="","",B2&"|"&F2&"@"&G2)

    I am using the characters “|” and “@” here, because I am assuming they do not occur in any if the names!! Please make sure if this is so!!

    Now copy cells F2 to H2, and paste them all the way down till wherever you have data.

    Now, I am also assuming that you have 8000 rows of data. If you have more than 8000 rows, replace all ‘8000’s in the following formulae with the number you desire.

    In cell Q2, paste the following formula,

    =IF(ISERROR(INDEX($H$2:$H$8000,MATCH(0,COUNTIF($Q$1:Q1,$H$2:$H$8000),0))),"",INDEX($H$2:$H$8000,MATCH(0,COUNTIF($Q$1:Q1,$H$2:$H$8000),0)))

    Please note that this is an array formula, and it needs to be entered with Ctrl+Shift+Enter. So in Q2, you paste this formula in the formula bar, and instead of pressing Enter, you press Ctrl + Shift + Enter. I have borrowed this formula from here.You may check out the site to see how this formula works.

    Now, in the cell K2, paste the following formula

    =IF(OR(Q2=0,Q2=""),"",LEFT(Q2,FIND("|",Q2)-1))

    In the cell P2, paste the following formula

    =IF(OR(Q2=0,Q2=""),"",VALUE(RIGHT(Q2,LEN(Q2)-(FIND("@",Q2)))))

    In the cell O2, paste the following formula

    =IF(OR(Q2=0,Q2=""),"",VALUE(MID(Q2,FIND("|",Q2)+1,LEN(Q2)-LEN(K2)-LEN(P2)-2)))

    In the cell J2, paste the following formula

    =IF(OR(Q2=0,Q2=""),"",TEXT(DATE(P2,O2,1),"mmm yyyy"))

    In the cell L2, paste the following formula

    =IF(OR(Q2=0,Q2=""),"",INDEX($C$2:$C$8000,MATCH(K2,$B$2:$B$8000,0)))

    In the cell M2, paste the following formula

    =IF(OR(Q2=0,Q2=""),"",INDEX($D$2:$D$8000,MATCH(K2,$B$2:$B$8000,0)))

    In the cell N2, paste the following formula,

    =IF(OR(Q2=0,Q2=""),"",MAX(IF((($B$2:$B$8000=K2)*($F$2:$F$8000=O2)*($G$2:$G$8000=P2)),($E$2:$E$8000)))-MIN(IF((($B$2:$B$8000=K2)*($F$2:$F$8000=O2)*($G$2:$G$8000=P2)),($E$2:$E$8000))))

    Again, please note that this is an array formula, and it needs to be entered with Ctrl+Shift+Enter. Make sure you have done all the steps above

    Now select cells from J2 to Q2, copy them and paste them to as far as required. In the example screenshot, this would be upto row number 5 (to cover all possibilities).

    You finally have the table you require. You may now link this table in other places using a simple ‘equals to’ relation. Also, you can hide all these extra columns from your data sheet if you so wish.

    Whew!! I really hope that solved your problem!! I think I deserve a pat on the back for all this effort!! Hope it helps! 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple 4-column Excel spreadsheet that matches universities to their ID codes
I have an Excel spreadsheet of some product data, (just a simple table) that
As simple as possible: I have a very simple Excel spreadsheet with just over
I have an XML document that is pretty much structured like an Excel spreadsheet
I have a simple Excel 2007 Macro that is reading a text file line
I have about 200 Excel files that are in standard Excel 2003 format. I
I have a excel spreadsheet that contains a bunch of columns. My first column
i have a very simple excel file that i need to import into a
I have simple win service, that executes few tasks periodically. How should I pass
I have simple form. <form target=_blank action=somescript.php method=Post id=simpleForm> <input type=hidden name=url value=http://...> <input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.