using count function in a query

y2k

Board Regular
Joined
Feb 25, 2002
Messages
133
please, can somebody help me? This sounds pretty simple, but I can't get it to work. Am I correct in saying that Access has a built in "count" function for counting the amount of occurrences of a certain value in column? anyway, that's basicly what I want to do. So I have a field called Claim Number. How can I create another field in a query that will look through this field and return a 1 if a value is present once, a two if a value is present twice and a three if a value is present three times etc etc etc like so:
Claim Number Times
123456 2
546879 1
652014 1
602154 2
123456 2
802546 1
602154 2


Any help would be so greatly appreciated
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
you mean something like

SELECT COUNT(CRITERIAFIELDNAME) FROM TABLENAME WHERE CRITERIAFIELDNAME = 'CRITERIA'
 
Upvote 0

Forum statistics

Threads
1,221,517
Messages
6,160,264
Members
451,635
Latest member
nithchun

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