Convert Excel Formula to a Access query

Number11

Member
Local time
Today, 00:40
Joined
Jan 29, 2020
Messages
625
Need to find away for access to provide the same results as an excel formula I have for counting the number of times a customer appears in the same week number

Column A = AccountNo
Column F - Week Number

Candidate Week CountCandidate Total Count
=1/COUNTIFS(A:A,A2,F:F,F2)​
=1/COUNTIF(A:A,A2)​
 
Hmm, have you tried DCount()? Just curious...
 
Hmm, have you tried DCount()? Just curious...
Thanks and oh no haven't tried that and not 100% sure how that would look in regards to formula
 
For an Access query it would be a simple aggregate query:


Code:
SELECT F, COUNT(F) AS Appearances 
FROM YourTableNameHere
WHERE A='Enter Specific Account Number Here'
GROUP BY F
 
Thanks and oh no haven't tried that and not 100% sure how that would look in regards to formula
My guess would be something along these lines.
Code:
=DCount("*","TableName","AccountNo='123456' AND WeekNo=52")
 
SELECT Table1.AccountNo, Count(Table1.[Week No]) AS [CountOfWeek No]
FROM Table1
GROUP BY Table1.AccountNo;
 

Users who are viewing this thread

Back
Top Bottom