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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

RAJESH NATH

Board Regular
Joined
May 19, 2020
Messages
55
Office Version
  1. 365
Platform
  1. Windows
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
 

Shaver1

New Member
Joined
Aug 21, 2020
Messages
2
Office Version
  1. 365
Platform
  1. MacOS
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,734
Messages
5,638,052
Members
417,001
Latest member
MSteel

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
Top