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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
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,224,820
Messages
6,181,162
Members
453,021
Latest member
Justyna P

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