• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro to count no of values in one column and insert similar rows

Hi ,

Can anyone help in VBA code for inserting rows in worksheet.
The number of rows to be inserted should be equal to no of visible cells data in another worksheet.
 
Is 'worksheet' the 1st worksheet and
'another worksheet' the 2nd worksheet of that workbook?
Do You really want to insert 'no of visible cells data' rows?
Number of visible rows would be many times less rows.
Where would You like to insert, from 1st row or middle or to end?
Are those empty row which You would like to insert?
...
Maybe it would be more clear case, if You could upload a Sample File, including wanted result.
 
Is 'worksheet' the 1st worksheet and
'another worksheet' the 2nd worksheet of that workbook?
Do You really want to insert 'no of visible cells data' rows?
Number of visible rows would be many times less rows.
Where would You like to insert, from 1st row or middle or to end?
Are those empty row which You would like to insert?
...
Maybe it would be more clear case, if You could upload a Sample File, including wanted result.
I need to insert on of rows in sheet "Input Check" based on now of subtotals in sheet "140550".sample attached.I need to insert row from row no 6

Many Thanks
 

Attachments

  • Book1.xlsx
    75.5 KB · Views: 5
Do You want 42 new empty rows to "Input Check" from row 6 and
of course Your old informations should keep?
You should make 'NEW Input Check'-sheet, there I could see wanted output after Macro. ...
if some values should copy to "Input Check" - who knows?
anyway 'Grand Total' not include this case, am I right?
 
Do You want 42 new empty rows to "Input Check" from row 6 and
of course Your old informations should keep?
You should make 'NEW Input Check'-sheet, there I could see wanted output after Macro. ...
if some values should copy to "Input Check" - who knows?
anyway 'Grand Total' not include this case, am I right?

Yes the rows needs to be inserted from row 6. Yes I want the old data to be kept.Grand total is not included. Please advise
 
... and where is 'NEW Input Check'-sheet with sample output
or You really want to have ONLY those '42 empty rows'?
 
... and where is 'NEW Input Check'-sheet with sample output
or You really want to have ONLY those '42 empty rows'?

I want to add empty rows in sheet "Input Check" itself. No new sheet needs to be created.The no of rows should be equal to no of FILTERED CELLS COUNT in column B in sheet "140550".
 

Attachments

  • Book1.xlsx
    75.5 KB · Views: 1
Okay.
You didn't want to make sample output sheet - okay.
There is the [New Rows]-button in top of "Input Check"-sheet.
It makes no of new empty rows as You wanted, nothing more!
 

Attachments

  • Book1 (5).xlsb
    41.1 KB · Views: 4
Back
Top