Find next instance of... VBA

ryancgarrett

Board Regular
Joined
Jun 18, 2011
Messages
122
I am trying (unsuccessfully) to write some code to do the following. I have a sheet called "Journal" where all transactions are recorded. It looks like this:



I have a button on a form titled "Post Transactions" and when that is clicked two things need to happen. The first, I need something that will go down and find the next transaction that has not been posted (indicated by the word "Posted" in column D) and the word posted should be placed in column D. I can't figure out how to scroll to the last instance of posted because of the blanks in between, but I am positive there is a way to do it.

Secondly, the amount of the transaction needs to be taken from the debit or credit column, and placed on the next line of the accounts worksheet. So in my screenshot shown on the last unposted transaction, $400 should be placed in the debit column of the "Purchases" sheet, as shown below.



I don't even know where to start on this, any help would be greatly appreciated!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Im sure I can help you with this but the screenshot would be very helpful. Can you please add the screenshot showing your data source?
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,706
Members
452,939
Latest member
WCrawford

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