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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert Row Above Data In Column A 1

Status
Not open for further replies.

APElliott

Technical User
Jul 9, 2002
165
GB
Hello,

Column A as page references within it, but not on every row.

I would like a code to insert a row above each page reference.

Easy I now, but please tell me how!

Thanks

Andrew
 
I'm not sure I understand you correctly? Does your table look something like this?
Code:
ColA
Page1
123457
Page1
891011
121314  'Where this is where you want to have "Page1" above it?
Page1
123456
Page1
78910

Does your Page reference change or is it a constant?
Do you just want to have the page name between every line item?

I need a little more detail.



If you can't be "The Best", be the best at what you can!!!

Never say Never!!!
Nothing is impossible!!!
 
Thanks For The Reply!

OK. This is the kind of detail I have, and I want a new row inserting wherever a page reference appears.

Hope this explains everything!

Thanks

Andrew

Col A Col B
02/06 £3.65
£4.00
£9.50
02/06 £1.01
£2.05
£3.25
£0.15
£0.25
02/07 £0.99
02/08 £19.05
£0.06
02/08 £0.32
£0.15




 
Whow - calm down.

The 2 threads you have highlighted above, have all got responses from me thanking the other users. So I don't know where you are coming from there.

As for Stars - I though that Stars where for marking post as Helpful/Expert not for personal recognition.

All Help is obviously helpful, but I'm affaid that because I'm a novice that I woouldn't now how helpful it would be to others.

And for your information I have taken your other comments to heart. I often take a look a peoples thread only to find that they have already been solve several times by more capable people than myself.

I hope you've impressed yourself.

Now as for the thread (not that your interested any more)

I'm pretty sure that I have explained quite well what I am trying to achieve. Although I do recognise that the answer may be for more difficult to work out than I could ever imagine.

Just going back to your Ask>Get>Go remarks. These are completely unfounded. I have responded with thanks if you would care to read the treads in full. Once you receive help to your threads do you not take time to build the information into your speadsheets etc..., because I do

I try to be very careful not to give unneccesary information to save peoples time.

Yours Pissed Off

Andrew

 
Just a little light reading to jog your memory.

APElliott's Member Profile

I've been a member since Jul 9, 2002, and have logged in 95 times. I last logged in on Mon, Aug 11, 2003.

Threads I've Started: 22
Replies In My Own Threads: 37
Replies To Other Members' Threads: 2
FAQs I've Written: 0
TipMaster Votes I've Received: 1

While in the forums, I have voted 0 posts helpful, letting my fellow members know their posts have helped me with my work. (If you feel a post has been helpful to you, click on the link at the bottom of their post to cast a vote for "TipMaster Of The Week". You don't need to be the one who asked the question to vote.)

This is YOUR profile, click on your name and you will see it.

Need I say more.


 
I am not on a star hunt, but I figured that a member that has been around for over a year would know such things.

Sorry if I offended you.

 
Ok. Rather than RF all of the above posts I'll give this a try instead.

Andrew: There is nothing in your sample data that indicates a "page reference" unless you mean that each instance of a date is the start of a new page. It's difficult to take that leap (at least for me) because that leaves only a very small amount of data per page. Bowers74's point is, I think, that you have not marked any threads as "helpful." I understand that that the phrase is slightly ambiguous, but the sense that most members seem take from it is "helpful to you."

Bowers74: Your points are completely valid, but you could perhaps have phrased them differently and avoided the beginnings of a flame war. I too have helped Andrew in the past, and while he has not awarded any stars, he has at least expressed appreciation.

Andrew: If you care actually to answer Bowers74's question and provide the missing detail of exactly what constitues a "page reference" (rather than simply spew invective) perhaps you can receive the assistance you seek.

 
OK,

My last response was obviously not clear enough.

Yes you are better than me - have 1 star.

Yes I am a novice - your not - have 1 more star.

Yes although I'm a novice and I have only tried to help people on 2 occasions - lots less than you - have 1 more star.

I'm gettin the idea now - this place is only good enough for you.


Thankyou
Thankyou
Thankyou
Thankyou

Is this enough this time

I don't know about Tipster of the week!!!!

 
Thanks Zathras,

Sorry if I've not been to clear!

02/06 etc refers to page 6 of volume 2.

Column B as shown above should actually be C (sorry)

Column B would have an item reference in it say A, B etc.., and would appear on the same line as the page refs.

Again I'm sorry if its not to clear but I would like to know how to insert a row above each of these page refs.

I'm affraid I don't know how to explain myself any better!

Cheers,

Andrew
 
Instead of throwing a tantrum maybe you should think about the time and effort that is invested into figuring out the problems that you have.

I never once insinuated that I am better than you. I was simply trying to point out that you haven't been appreciative towards others (in the known way) in the past. Granted, you have thanked the members who have helped you verbally. You have even thanked me verbally.

As I said before, I am not here for the stars, and I am DEFINATELY not here for the Tipster of the Week award. I am here to help others and to learn from others as well.

Again (in other words), I was simply trying to point out that the traditional way of thanking someone in this forum is to award them a star (if the tip has personally helped you).


Now, if you would clearly state what you are trying to do with your page references, maybe we can get passed this and get on with the problem at hand. If you don't want my help, then start another thread and I will stay out of it.

Later,
Mike



If you can't be "The Best", be the best at what you can!!!

Never say Never!!!
Nothing is impossible!!!
 
One more thing, to award a star press the link at the bottom left of the tip that has helped you (Mark this post as a helpful/expert post!). Just saying:

Oooh Ohhh Ohhh, I give you a star!!!

Doesn't hack it.




If you can't be "The Best", be the best at what you can!!!

Never say Never!!!
Nothing is impossible!!!
 
This simple macro should do what you need:
[blue]
Code:
Option Explicit

Sub InsertBlankRows()
Dim nLastRow As Long
Dim nRow As Long
  With ActiveSheet.UsedRange
    nLastRow = .Rows.Count + .Row - 1
  End With
  For nRow = nLastRow To 1 Step -1
    If Not Cells(nRow, 1) = "" Then
      Cells(nRow, 1).EntireRow.Insert
    End If
  Next nRow
End Sub
[/color]

You may have to change the right-hand side of the test in the "If" statement, if your data have anything in the cells. For example, if the data are being imported from a text file the cells may have one or more blanks instead of being completely empty.

If I may offer one more piece of advice. Remember that when you ask for help, no one here knows anything more than what you put in your post. Try to re-read before posting to see whether enough information is supplied. For example, when your data includes something like 02/06, most of us (I daresay all) will read that as a date, no matter which side of the pond we are on. I never dreamed for a second that it was meant as volume/page.
 
Cheers for the help Zathras, and the advice!

I think I'm with the star thing now anyway.

Thankyou,

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top