CurrentRegion.Rows.Count to not look at specific column (row count VBA)

egemencoskun

New Member
Joined
Feb 9, 2010
Messages
19
Hi,

I am using

RowCount = Worksheets("Input").Range("A1").CurrentRegion.Rows.Count

and entering data from form as follow;

ith Worksheets("Input").Range("A1")
.Offset(RowCount, 0).Value = Me.Supplier.Value
.Offset(RowCount, 1).Value = Me.GLCode.Value
.Offset(RowCount, 2).Value = Me.VenueNo.Value
.Offset(RowCount, 3).Value = Me.Amount.Value
.Offset(RowCount, 4).Value = Me.VATCode.Value
.Offset(RowCount, 5).Value = Me.Reference.Value
.Offset(RowCount, 6).Value = Me.Description.Value
.Offset(RowCount, 7).Value = Me.Period.Value
.Offset(RowCount, 8).Value = DateValue(Me.TransDate.Value)
.Offset(RowCount, 9).Value = Me.User.Value
.Offset(RowCount, 10).Value = Me.JournalType.Value
.Offset(RowCount, 11).Value = Me.Distribution.Value
.Offset(RowCount, 12).Value = Format(Now, "dd/mm/yyyy hh:nn:ss")
.Offset(RowCount, 17).Value = ("Recorded")

However I have a formula in Column Q and the code sees this formula as value and posts my entry to the row where the formula ends.

Can I fix this row count to not look at Column Q or just look at Column A and count the values in Column A rather than looking at all the columns?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,214,622
Messages
6,120,585
Members
448,972
Latest member
Shantanu2024

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