Adding their corresponding values associated with duplicate entries

hcrawl

New Member
Joined
Jul 10, 2008
Messages
3
I am sorry for a vague or rather a totally obscure title but I didnot know how best to explain what I needed.

I obtained sales information for our small gas station company from our database.

I have four basic columns. A date column, item number, item description and its sales for that particular day.

so it looks some like this,

Code:
 date       code            description            count
7/1/2008    101085         CAMEL TURKISK ROYA           2
7/1/2008    101090         CAMEL TURKISH GOLD           1
7/1/2008    101100         CAMEL KS. BX. F.F.            5
7/1/2008    101140         CAMEL KS. BX. LT.             14
7/1/2008    101141         CAMEL WIDE KS. BX.            1
7/1/2008    101142         CAMEL WIDE KS. BX.            1
7/1/2008    101148         CAMEL MTHL. KS. BX            1

7/2/2008    101090         CAMEL TURKISH GOLD         3
7/2/2008    101100         CAMEL KS. BX. F.F.            1
7/2/2008    101140         CAMEL KS. BX. LT.             11
7/2/2008    101141         CAMEL WIDE KS. BX.           2
7/2/2008    101148         CAMEL MTHL. KS. BX           1
7/2/2008    101149         CAMEL MTHL. KS. BX           2
7/2/2008    101480         KOOL MTHL. KS. BX.            4
7/2/2008    101540         KOOL MILD MTHL. KS           3
The list is several entries for each day and I want to do analysis for say a month. So I have entries for each day and its corresponding number.

What I wanted was to have all these values added based on their item number. That is, probably a macro(?) which would peruse the item list and if it found a duplicate entry, it would add the total in sales column to its initial count and maybe paste it into a different sheet. I can completely do away with the dates column.

All I want is, for a particular period, how many of particular items I have sold.

Any ideas on how to go about this problem or if their is a similar macro anywhere online which I could use?

Thanks a lot for your consideration.
 

Some videos you may like

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

cornflakegirl

Well-known Member
Joined
Nov 4, 2004
Messages
2,023
Welcome to the board.

Your data look suitable for a pivot table - except for the blank rows, but you could get rid of them by sorting. Have you used a pivot table before?
 

hcrawl

New Member
Joined
Jul 10, 2008
Messages
3
Welcome to the board.

Your data look suitable for a pivot table - except for the blank rows, but you could get rid of them by sorting. Have you used a pivot table before?


hey,

Those blank rows were inserted by me to show that there is a date change in my data. I havent used pivot table before, but I have just started to. Thanks a lot for pointing me in the right direction.

I will spend some time reading through it and report back if I encounter any problems or have any questions.

Thanks a lot for your reply, really appreciate it.
 

hcrawl

New Member
Joined
Jul 10, 2008
Messages
3
I had to report back. Pivot table is the best thing I ever encountered from excel. Just kidding, it might be a little over kill, but it is everything I needed to do my analysis. Thanks a lot again.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,670
Messages
5,597,483
Members
414,146
Latest member
marginmakerb

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top