Rowcount only based on column A

JoboM

New Member
Joined
May 26, 2015
Messages
40
Hi there,

I'm trying to rowcount a table, to find the first empty row. However, as some of the columns in the table have If statements, I'd like to rowcount based only on the contents of column A.

That is, if column A is empty in that row, then consider that row empty.

Here is the section of code I am using:

Code:
                RowCount = mydata.Worksheets("Logistics Tracker").Range("A4").CurrentRegion.Rows.Count
                With mydata.Worksheets("Logistics Tracker").Range("A4")

Thanks,
Josh.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Are you trying to get a count of the blank cells in Column A? If so, I think this may work...

Code:
[table="width: 500"]
[tr]
	[td]RowCount = mydata.Worksheets("Logistics Tracker").Range("A4").CurrentRegion.Columns(1).SpecialCells(xlblanks).Count[/td]
[/tr]
[/table]
 
Upvote 0
Hmm I tried that line and it didn't work.

I want the code to find the first empty cell in column A (starting at A4), and use that count as the row number to enter the data into.

The code I showed above has been trying to find the first completely empty row in the table.

Thanks for your help!
 
Upvote 0
Rowcount only looking at one column

Hi guys,

I've been attempting a rowcount that only looks at the one column.

I don't care if other columns have data in that row, as long as column A is empty, I would like to know that count (count to the first empty cell in column A)

Thanks!
 
Upvote 0
Re: Rowcount only looking at one column

Hi JoboM,

Would the below work? Please use Ctrl+Shift+Enter to enter the formula

Code:
=MATCH(TRUE,ISBLANK(A:A),0)
 
Upvote 0
I want the code to find the first empty cell in column A (starting at A4), and use that count as the row number to enter the data into.

The code I showed above has been trying to find the first completely empty row in the table.
Does this do what you want?
Code:
[table="width: 500"]
[tr]
	[td]RowCount = mydata.Worksheets("Logistics Tracker").Range("A4").CurrentRegion.Columns(1).SpecialCells(xlblanks)(1).Row - 3[/td]
[/tr]
[/table]
 
Upvote 0
Re: Rowcount only looking at one column

@JoboM

Please do not repost the same question. I've merged your two threads.
 
Upvote 0

Forum statistics

Threads
1,215,443
Messages
6,124,890
Members
449,194
Latest member
JayEggleton

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