Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2010 - Can excell do this? 1

Status
Not open for further replies.

Snookless7

Technical User
Feb 18, 2010
28
0
0
US
Hello,

I have a simple spreadsheet that has all the same numbers in Column A1 through A9, for example 66555.

Then from A10 to A17 another identical set, example 39511.
This goes on and on, and the groups of numbers have all different qty of rows. all other columns have all different numbers

What I am looking to do is insert a blank row between each of these groups. I have been doing this manually...is there a Macro I can use?

The only thing consistent is the group of numbers in Column A.

Any Ideas?

thank you
 

hi,

is there a reason for inserting empty rows? this often destroys or greatly hampers the usefulness of tables and analysis features in Excel.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 

I am with Skip on this one, but if you are doing it by hand anyway...
Code:
Sub InsertBlankRows()
Dim i As Integer
Dim lngNo As Long

i = 1
lngNo = Range("A1").Value

Do Until Range("A" & i).Value = ""
    If lngNo <> Range("A" & i).Value Then
        lngNo = Range("A" & i).Value
        Range("A" & i).EntireRow.Insert
    End If
    i = i + 1
Loop

End Sub

Have fun.

---- Andy
 
Hello,

I need an empty row under each group because I need to sum all the numbers in all the other columns.

Does this make sense? Or is there an easier way to do this all together.

so for example.....A1 to A9 has an order ID number of 92392...in column b,c,d,e......and so on are numbers I need to sum for each of these orders.
 
Andrzejek....that worked great! Unfortunately I have no control of how I get the spreadsheet and I understand how it hampers the usefulness.

Is there a better way of doing what i am trying to do?

And thank you again...really appreciate it.
 


I need to sum all the numbers in all the other columns
What a tedious task!!!

Why not use the Data > Subtotal feature!!!


Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Why not use the Data Subtotal Feature??

I did not know there was one. I know I know......I will look that up and see if I can figure that one out.

Thank you much
Todd
 
I think I got it...but is there a way to not make it create a whole new column to the left?
 


That's part of the feature.

Nice a quick, or tedious and messy.

YOUR CHOICE!!!

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Skip.........your right of course. I think I will choose Nice and Quick.
Thanks for your help
 
So Last Month I go the above Macro and it worked great, I did save the Macro but when i try to run it I get an "Run-Time Error Type MisMatch"

What am I doing wrong, the spreadsheet is the same except for the data within it.

Thanks
 


plese post your macro.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 


okay, you are using Andy's macro AS WRITTEN?

You get Type missmatch on what statement?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
I got it...was user Error. i forgot to remove the header.
Thanks peeps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top