Claculate no of rows in a sheet and add deficient no of rows

ankit13

New Member
Joined
Aug 21, 2014
Messages
14
Hi,

I have a sheet where no of rows are 90 and I want to a VBA code which:
1. Check the no of rows in the sheet
2. if the no of rows are less than 90 then add deficient no of rows below row no 68.

I will be adding the above code in my current code, therefore please send a very simple code.

Please help.!!!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi,

I have a sheet where no of rows are 90 and I want to a VBA code which:
1. Check the no of rows in the sheet
2. if the no of rows are less than 90 then add deficient no of rows below row no 68.

I will be adding the above code in my current code, therefore please send a very simple code.

Please help.!!!


The number of rows in a worksheet is fixed (normally at 1,048,576 rows).

Please can you clarify what you mean?
 
Upvote 0
Probably I can't help you enough with your question.

though the question is very poor with information.

A sheet always has 90 rows in it.

you need to add e.g. the information on which column(s) the count is related.

you have headers also / they also have to count for the number of 90 rows?
 
Upvote 0
sorry for the poor question
I meant the no of filled/used rows is 90 and other rows I am not using.
 
Upvote 0
one more thing which i forgot to mention that on the last (90th) row, there is a text, so you can take the count from row 1 to the row containing the note (which i want to be 90 rows)
 
Upvote 0
Code:
you need to add e.g. the information on which column(s) the count is related.

you have headers also / they also have to count for the number of 90 rows?

why no answers to this questions?
 
Upvote 0
found it
code: Do Dim LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
If LR <> 90 Then Range("70:70").Insert Shift:=xlDown
Loop Until LR = 90:
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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