Adding COUNT to records

Status
Not open for further replies.

abesimpson

Active Member
Joined
May 3, 2003
Messages
435
I import a text file of several million records into Access every month .
Each record has a date field, and a value field. The database is sorted first on date, then on value. Each date has many values, but there is no fixed number of records per date.

The sorted database looks like this:
Date1, Value1
Date1, Value2
Date1, Value3
Date1, Value4
Date2, Value1
Date2, Value2
Date2, Value3
Date3, Value1
Date3, Value2
Date4, Value1
etc.

I need to add a count per record, to get this:,
Date1, Value1, Count1
Date1, Value2, Count2
Date1, Value3, Count3
Date1, Value4, Count4
Date2, Value1, Count1
Date2, Value2, Count2
Date2, Value3, Count3
Date3, Value1, Count1
Date3, Value2, Count2
Date4, Value1, Count1
etc


I habve NO idea how to do this. Any help will be appreciated.

abe
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Status
Not open for further replies.

Forum statistics

Threads
1,214,875
Messages
6,122,046
Members
449,063
Latest member
ak94

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
Back
Top