Count of Column F and Sum of Column G

Muthukrishnan V

Active Member
Joined
May 29, 2008
Messages
294
Office Version
  1. 365
Platform
  1. Windows
Book6.xlsx
ABCDEFG
1DateExpensesDateSpecified DateExpenses
223-04-20241,00023-04-202423-04-20241,000
304-04-202412,00023-04-2024555
417-04-202417,043Output:02-01-190092,365
523-04-2024555F4= 2
624-04-2024600G4=1555
718-04-20246,500
8
9
10
11
12
13
14
15
16
Sheet24
Cell Formulas
RangeFormula
D2D2=A2
F2:G4F2=LET(f,FILTER(A2:B16,A2:A16=D2),ct,ROWS(f),s,SUM(f),IFERROR(VSTACK(f,HSTACK(ct,s)),""))
Dynamic array formulas.


I request help to kindly amend the formula so that column F gives the number of counts and column G gives the sum total. Thanks
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Since you're using a dynamic array, the count will be formatted as date if you want it below it (F4). Why?
Excel Formula:
=LET(f,FILTER(A2:B16,A2:A16=D2),ct,ROWS(f),s,SUM(CHOOSECOLS(f,2)),IFERROR(VSTACK(f,HSTACK(ct,s)),""))
 
Upvote 0
Since you're using a dynamic array, the count will be formatted as date if you want it below it (F4). Why?
Excel Formula:
=LET(f,FILTER(A2:B16,A2:A16=D2),ct,ROWS(f),s,SUM(CHOOSECOLS(f,2)),IFERROR(VSTACK(f,HSTACK(ct,s)),""))
Sir, what shall I do to achieve the correct output? Col F is formatted as Date. Should I change Col F to text? Column G is formatted as number. Kindly correct me sir,
 
Upvote 0
I'd recommend not having it in the same column but I don't know what your intention is.
 
Upvote 0
I'd recommend not having it in the same column but I don't know what your intention is.
Thank you Mr Cubist sir, I value your recommendations sir. Kindly amend the formula to give sum total of Column G only and Count of Col F is NOT required.
 
Upvote 0
Book1
ABCDEFG
1DateExpensesDateSpecified DateExpenses
24/23/241,000454054/23/241,000.0
34/4/2412,0004/23/24555.0
44/17/2417,043Output:1555
54/23/24555F4= 2
64/24/24600G4=1555
74/18/246,500
Sheet8
Cell Formulas
RangeFormula
D2D2=A2
F2:G4F2=LET(f,FILTER(A2:B16,A2:A16=D2),s,SUM(CHOOSECOLS(f,2)),VSTACK(f,HSTACK("",s)))
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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