Find first empty cell in row range-VBA

ljubo_gr

Board Regular
Joined
Dec 6, 2014
Messages
244
Office Version
  1. 2016
Platform
  1. Windows
=Happy+New(Year(2017))

I have three sheets, they have columns A&B, ranges A2:A100, B2:B100. "A" range will always be shorter than B, if that means something. I need vba code to move my selector to First free cell in sheet1 "A"range, another code for "B"range, then another codes for Sheet2...Sheet3.
Thanks in advance kind people!
 
Last edited:
it highlights the row of a selected cell between range: A2:U721, i think they cannot be in ThisWorkbook together? I must put Michael+s code inside a module, but then it will not work for those three sheets with different ranges:(
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Change your arrow codes to

Code:
Sub upArrow()
Thisworkbook.activesheet.Range("B7:B" & Cells(Rows.Count, "B").End(xlUp).Row).Find(What:="", lookat:=xlWhole).select
End Sub

Sub DownArrow()
Thisworkbook.activesheet.Range("P7:P" & Cells(Rows.Count, "P").End(xlUp).Row).Find(What:="", lookat:=xlWhole).select
End Sub
Which should be in thisworkbook module and will apply to the activesheetsheet

Because you have different ranges in each sheet....that's why I suggested the InputBox Method !!!
 
Last edited:
Upvote 0
Change your arrow codes to

Code:
Sub upArrow()
Thisworkbook.activesheet.Range("B7:B" & Cells(Rows.Count, "B").End(xlUp).Row).Find(What:="", lookat:=xlWhole).select
End Sub

Sub DownArrow()
Thisworkbook.activesheet.Range("P7:P" & Cells(Rows.Count, "P").End(xlUp).Row).Find(What:="", lookat:=xlWhole).select
End Sub
Which should be in thisworkbook module and will apply to the activesheetsheet

Leave it in ThisWorkbook?
 
Upvote 0
Did you read the entire message I Posted......???
 
Upvote 0
dom97l.jpg
 
Upvote 0
CAn't see the highlighted line....but the code works fine for me.
CAn you upload the workbook to Dropbox and then post the link back here ???
 
Upvote 0

Forum statistics

Threads
1,215,387
Messages
6,124,637
Members
449,177
Latest member
Sousanna Aristiadou

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