Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default SPLIT AMOUNT BY MACRO

Hi,
In column "A" of "Sheet 1" I have codes like "A" , "B" , "C" which
indicates that how amount should be split into months of a year and in
column "B" of "Sheet 1" I have amount figures against the codes which
are in column "A".

A B -------columns
A 1000
B 2000
C 3000

In cells "A1:D14" of "Sheet 2" I have percentage data table which
indicates that which code in coloumn "A" of "Sheet 1" should split
amount (which is in column "B" cells) into which way (please see the
data table below)

A B C D ----Columns
Month A B C ----Headings
200701 8 0 10---percentages
200702 8 0 10
200703 9 0 10
200704 8 0 10
200705 8 0 10
200706 9 14 10
200707 8 14 10
200708 8 15 10
200709 9 14 10
200710 8 14 10
200711 8 15 0
200712 9 14 0
Total 100 100 100

(please not that in column "A" of "Sheet 2" Month is coded as 200701
which mean that year 2007 and 01 first month)
I want macro which should be set on a button and it should cover the
Range ("A2:B10") of "Sheet 1" and it should put the results on "Sheet
3" leaving the first row as that will be use for Headings. Macro
should work as when I put any code from "A to C" in cell "A2 of column
"A" of "Sheet 1" and any amount in column "B" against the code then it
should split that amount the way its shown in "Sheet 2" percentage
data table and put the result in "Sheet 3" and when i put another code
in cell "A3" of column "A" in "Sheet 1" and any other amount in column
"B" then it should again split the amount and now it should put the
result in "Sheet 3" but below the fist result.
FOR EXAMPLE if I put data in "Sheet 1" from cell "A2 of column "A" as
shown below

A B -------columns
A 1000
B 2000
C 3000

Then Macro should produce result in "Sheet 3" as shown below

A B C ------Columns
Month Code Amt -----Headings
200701 A 80
200702 A 80
200703 A 90
200704 A 80
200705 A 80
200706 A 90
200707 A 80
200708 A 80
200709 A 90
200710 A 80
200711 A 80
200712 A 90
200701 B 0
200702 B 0
200703 B 0
200704 B 0
200705 B 0
200706 B 280
200707 B 280
200708 B 300
200709 B 280
200710 B 280
200711 B 300
200712 B 280
200701 C 300
200702 C 300
200703 C 300
200704 C 300
200705 C 300
200706 C 300
200707 C 300
200708 C 300
200709 C 300
200710 C 300
200711 C 0
200712 C 0

I'll be very greatful if anybody can help as this macro will make lots
of people jobs easy. Thanks
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I split a sheet so I can have different amount of columns? birmel Excel Worksheet Functions 1 July 29th 09 02:53 PM
Formula for amount owing subtract amount paid Taperchart Excel Worksheet Functions 1 June 4th 06 05:51 PM
How can I calculate amount of time left based on amount spent? KLD Excel Worksheet Functions 3 May 23rd 06 04:20 PM
getting a macro to run X amount of times.. Hru48 Excel Discussion (Misc queries) 2 August 19th 05 03:57 PM
split a cash amount into two separate cash amounts tegger Excel Programming 2 November 9th 03 03:05 PM


All times are GMT +1. The time now is 09:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"