Need Macro

pklimchuk

Board Regular
Joined
Oct 8, 2010
Messages
101
Hello Im looking for a Macro,
That would sum all the Totals in Column B for Jan then Feb an so on

and have the Totals Pasted in Column L


Example
Column A Column B
Jan1 $5
jan2 $6
jan3 $3
Feb1 $4
feb2 $5
feb3 $5


Column L
Jan Total $14
Feb Total $14
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
You can do it without a Macro if you're interested?

A1 = Month (jan, feb, mar etc)
B1 = $$ amount

M1 to M12 = Month that you want to total (Jan, Feb, Mar etc)
L1 = Sum of the Month that is in M1

L1 = SUMIF(A:A,M1&CHAR(42),B:B)

(method borrowed from Aladin - http://www.mrexcel.com/forum/showthread.php?t=25574 )

M1 to M12 can be hidden ... they can be another sheet that you hide, they can be wherever you like, but this does assume that Column A is stored as TEXT.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,854
Members
452,948
Latest member
UsmanAli786

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