Log in

No account? Create an account

Previous Entry | Next Entry

Excel is kicking my ass...

I am trying to figure out how to count a value in excel.

I have email addresses for customers and dates of transactions - about 25,000 customers, and over 60,000 lines of data. I need a countif formula that tells excel to count the email address if there is more than one transaction on the same date. Every transaction line has a unique date.

I have spend all day trying to figure this out, and my boss just told me that it was challenging (I think he's humouring me) and to go home, that we would figure it out tomorrow.

It's so frustrating because I wanted to have this done for him today. He needs it for a presentation next week and I feel like I'm really letting him down.




Jul. 15th, 2011 03:33 am (UTC)
It's been while since I did anything in Excel, but...

If every line is a unique date, then am I right in thinking that if there is more than one transaction per date, then those transactions would all be on the same line? How does it indicate that there's more than one transaction per date?
Jul. 15th, 2011 05:59 am (UTC)
I compiled the data into a pivot table and the pivot has the email address; then all the transaction IDs, one per line; then the skus associated with the TIDs, one per line; then the date of the transactions, on the same line as each transaction ID.

So I could have John Doe having made 5 transactions, and what I am trying to determine is how many of those purchases are same day. I don't care if they are different days - what I want to know is how many are same day.

Does that make sense?
Jul. 15th, 2011 02:33 pm (UTC)
Let me make sure I have this straight - all your data fields are currently in the row area of the pivot, correct? If so, I think what you need to do is this:

Put the email field in the row area of the pivot first. Then put the transaction date field in the row area. Then put the transaction IDs and SKUs in the data area of the pivot, and set totals in the data area to Count.

Jul. 15th, 2011 02:42 pm (UTC)
(There are several different tweaks you can do depending on what data you want to be visible, but in general, if you want Excel to count something in a pivot table, you always want the Thing To Be Counted to be in the data area of the pivot. In this case, you aren't really counting dates, you're counting SKUs/TIDs, so that's what you want in the data area, where you can get the pivot table to do the heavy lifting for you. You shouldn't have to be writing code in a pivot table at all, you just right-click on whatever's in the data area, select Totals, and then select the type of total you want it to do - count, sum, average, etc.)
Jul. 20th, 2011 01:34 am (UTC)
I think I was actually confusing myself - well, I know I was - because the data was confusing. I was using the same data set to pull different values and then try to compare and contrast them, and part of the problem was that some of the customers fell in both single and multiple date sets if they bought 2 items one day and another item another day. So it was more like I needed a Venn Diagram as well.

*head desk* It's done now. Thank God. But thanks for the help - it was nice to have all the suggestions, cuz I was pulling my hair out!


Geek by Shaddyr

Latest Month

May 2019



Page Summary

Powered by LiveJournal.com
Designed by Tiffany Chow