Excel SCAN function by for each column in a table

jrhouse5

New Member
Joined
Sep 8, 2023
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Can the Excel SCAN function work on a table a calculate a running total for each column individually. I tried the following formula:

=TRANSPOSE(SCAN(0,TRANSPOSE(Table_Array),LAMBDA(a,v,a+v)))

However, I get a running cum by column for the whole table, not for each column individually.

Capture2.PNG
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi jrhouse5,

Please post your data using the XL2BB tool so we can copy and paste your data locally and work on a solution.

Thanks,

Doug
 
Upvote 0
Nice, MAKEARRAY, another function I have not used and should probably learn.

Thanks,

Doug
 
Upvote 1
You could also do that with mmult like
Excel Formula:
=LET(r,ROWS(Table_Array),MMULT(--(SEQUENCE(r)>=SEQUENCE(,r)),--Table_Array))
 
  • Like
Reactions: ISY
Upvote 1
If you want to use a lambda function, you could also shorten your formula slightly like
Excel Formula:
=MAKEARRAY(ROWS(Table_Array),COLUMNS(Table_Array),LAMBDA(r,c,SUM(INDEX(Table_Array,SEQUENCE(r),c))))
 
Upvote 1

Forum statistics

Threads
1,216,030
Messages
6,128,418
Members
449,449
Latest member
Quiet_Nectarine_

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