Populate next blank column in row

sharky12345

Well-known Member
Joined
Aug 5, 2010
Messages
3,404
Office Version
  1. 2016
Platform
  1. Windows
Hi Guys,

I'm trying to work out how to populate the next blank row with data using a loop but starting in column E. My procedure finds the first blank row in column A then starts populating the cells but I need it to populate columns starting with column E with some of the data and this is what I'm stuck on.

This is what I have so far:

VBA Code:
LastRow = Sheet4.Range("A65536").End(xlUp).Row + 1

For i = 1 To 31
If Me.Controls("TextIssue" & i) <> "" Then

' This is where I'm stuck

Next i

So I know how to populate the next empty row in a column, but I can't work out how to populate the next empty column starting with E, (but in the same row as LastRow).

Hopefully you'll understand what I'm trying to achieve - it makes sense in my head!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Cells(LastRow,5) = whatever

will put the contents of the variable whatever into the cell at row = LastRow and Column E

if you only want to change it if it is blank then use

if Cells(LastRow,5) = "" then Cells(LastRow,5) = whatever

if you want to control the column using your index variable i, then to start in column E use

Cells(LastRow,i+4) = whatever
 
Upvote 0
Solution

Forum statistics

Threads
1,214,979
Messages
6,122,552
Members
449,088
Latest member
davidcom

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