Find Next Empty Cell in Table

Shaver1

New Member
Joined
Aug 21, 2020
Messages
2
Office Version
  1. 365
Platform
  1. MacOS
Howdy,
I would like to write a loop that finds the first empty cell in Table 1, then repeats until x where x equals a value entered into a msgbox. I am attempting to make a Monte Carlo simulator that runs a complex financial planning scenario, copies the results into a table, and repeats for a specified number of trials, x.

Here's the logic flow:
  1. Press button to activate macro
  2. message box pops up: "enter trial numbers" (x)
  3. Clear contents from Table 1
  4. Select and Copy range A1:G1
  5. Paste in first empty row in Table 1
  6. Manually calculates "Sheet 1"
  7. Select and Copy range A1:G1
  8. Find and paste in next empty row in table 1
  9. Repeat for x times
I'm VBA ignorant but can struggle my way through. Spoon feeding may be required.

Regards,
Carter
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
If i correct what you want then,
select the range (from where you want to find empty cell)>ctrl+G>select special>click blank>=select what you want on blank>ctrl+D
 
Upvote 0
Yes, I believe that's correct. Though now that I'm thinking through this, the table (Table 1) will not have any blank rows after the first results are recorded in the table. So, the code will need to paste the next results in the next empty row below the table.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,755
Members
448,989
Latest member
mariah3

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