paste cell in another sheet in a specific range based upon criteria

thebrin

New Member
Joined
Feb 9, 2015
Messages
2
Hi,
I am new to VBA and have a question.
I am using sheet 1 as a General Journal and sheet 2 as a summary showing each entry that matched each category.
Sheet 1 will have journal entries in column F (Rent, Cash, Accounts receivable etc.)
Column J will have the debit amount (integer) and K will have the credit amount.
I wish to copy and paste the amounts in either column J or K to a specific range in sheet 2 based upon the text in column f.
For instance - If column F is "Cash" then the amount in column J or K needs to be pasted to the next available cell in a range on sheet 2.
For instance -
if F14 has "rent" then K14 needs to be copied to next available cell in a range (D4:D14) in sheet 2
if F14 has "Cash" then K14 needs to be copied to next available cell in a range (D20:D30) in sheet 2. etc etc.

I'm thinking - If [F14].Value = "Rent" then '2'! (next available cell) in range D4:D14
If [F14].Value = "Cash" then '2'! (next available cell) in range D20:D30
Any help would be appreciated
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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