Returning value to next empty row that is not hidden

shepa1nj

New Member
Joined
Apr 13, 2017
Messages
1
I am scraping an email for certain values that will return in my excel spreadsheet. If one of the values is hidden the next email that is scraped replaces the values in the hidden row instead of in the next blank row. Does anyone have any ideas on how to skip the hidden values and return the scrapped info to the first blank row?
The code I have for retrieving the first available row is

'Retrieving the first available row to put message in
Line = .Range("A65000") .End (x1Up) .Row + 1

Any thoughts?

Noah
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
I am scraping an email for certain values that will return in my excel spreadsheet. If one of the values is hidden the next email that is scraped replaces the values in the hidden row instead of in the next blank row. Does anyone have any ideas on how to skip the hidden values and return the scrapped info to the first blank row?
The code I have for retrieving the first available row is

'Retrieving the first available row to put message in
Line = .Range("A65000") .End (x1Up) .Row + 1

Any thoughts?

Noah

Try this...

lastrow = Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
 
Upvote 0
Or something like this
Code:
Sub t()
Dim line As Long
line = Cells(Rows.Count, 1).End(xlUp).Row + 1
Range("E2").Copy
While Rows(line).Hidden = True
    line = line + 1
Wend
Range("A" & line).PasteSpecial xlPasteValues 'or whatever you it is you do
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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