Finding blank cell in row whilst avoiding blank cells if non-blank cells are to the right of it

Milos

Board Regular
Joined
Aug 28, 2016
Messages
121
Office Version
  1. 365
Platform
  1. Windows
Hi there,

Sorry for the massive title!

I am using a helper column that works well, but I want it to smarten my find code up to avoid finding the first empty cell in row 1 as often the columns with an empty header still contain data but someone has often been messy when designing a spreadsheet and left a header blank. So I want the find code to avoid blank cells if there is non-blank cells to the right of it. Does anyone know how I would re-wire my code to achieve this?

Code:
Set helper_column = range("1:1").Find("", , , xlWhole, , , False, , False)

So in my terrible example below I want my find code to avoid Column C as there is data to the right of the cell

ABCDEF
1 SunnyRainyCloudyStormyThis is the cell
i want to reference
25 days1 daydays present3 days0 days

<tbody>
</tbody>

Cheers,
Milos
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
What if both C1 and D1 were blank... what cell would you want referenced?

Are you simply looking for the blank cell after the last data cell in Row 1?
 
Upvote 0
If they are both blank then F1 is the cell that I would want referenced. So yes the blank cell after the last data cell in row 1.
 
Upvote 0
If they are both blank then F1 is the cell that I would want referenced. So yes the blank cell after the last data cell in row 1.
Try this...

Set Helper_Column = Cells(1, Columns.Count).End(xlToLeft).Offset(, 1)
 
Upvote 0

Forum statistics

Threads
1,214,528
Messages
6,120,065
Members
448,941
Latest member
AlphaRino

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