开发者

Moving values from one sheet to another

开发者 https://www.devze.com 2022-12-12 20:27 出处:网络
I\'m looking for an Excel 2003 macro to solve this problem. I have a sheet that holds financial information:

I'm looking for an Excel 2003 macro to solve this problem.

I have a sheet that holds financial information:

A1 holds client names and AI1,AK1,AM1 etc, hold months April, May, June (all string values) etc; with the rows below that holding the amount due for the corresponding month. The last row is the total.

What I need is to create a summary page that checks a named field called current month which holds the current month as a string value, and the bala开发者_StackOverflownces for each month up to and including the current month.

If the total due is greater than 0, then place the month name and the total due into a new table on the summary page, so that I end up with a table that has only the months that we have money due to us on it.


You haven't laid out why you need it to be a macro. But anyway... to make sure I understand the request:

Effectively, create a summary table for each client.

If the sum of dues from January to CurrentMonth > 0 then copy the table.

Delete the column of each month where the amount due is zero.

Okay, since this is Excel 2003, I've been very cautious.

I decided to use a pivot table, then if you want to expand the detail to help identify the clients responsible you can easily do so.

Code

Screencaps at imgur.com: fO7zM.png eCWS2.png 7FBUV.png (I can't post more than one link yet per post)

0

精彩评论

暂无评论...
验证码 换一张
取 消