Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Can you please help write this macro to achieve the following,
I would like to copy the data from sheet "Bank Statement" to "Transactions". The macro should check if the cell A2 on the "Transaction" sheet is empty. If it is just insert 1 in the cell A2 on the "Bank statement" sheet. Then copy the data from that sheet to A2 on the "Transaction" sheet. If cell A2 on the "Transaction" sheet is not empty. Look at the maximum value in column A of the "Transaction", add 1 to this value and insert it in cell A2 on the "Bank statement" sheet. Then copy the data from that sheet to the "Transaction" sheet, but this time find the last row being used, and paste the data in column A, in the row below the last row. In my example this would be row 6. I hope it is clear what I am trying to achieve. Sheet named "Bank Statement" A B C D 1 Row Date Text Amount 2 02/07/2009 ddd 20 3 =B10+1 02/07/2009 eee 50 4 =B11+1 02/07/2009 fff 29 5 =B12+1 02/07/2009 ggg 30 6 =B13+1 02/07/2009 hhh 33 Sheet named "Transactions" A B C D E F G 1 Row Date Text Amount ID Name Amount 2 1 01/07/2009 aaa 100 3 2 01/07/2009 bbb 200 4 3 01/07/2009 ccc 300 1000 John 2000 5 1001 Jack 1000 6 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy range and paste as picture | Excel Discussion (Misc queries) | |||
Copy, Paste and Rename a Range using a macro | Excel Discussion (Misc queries) | |||
VBA Code- Copy & Paste in Blank Range | Excel Discussion (Misc queries) | |||
copy range and paste into every 3rd cell of new range | New Users to Excel | |||
CheckBox Code to copy & paste range | Excel Discussion (Misc queries) |