+ Reply to Thread
Results 1 to 5 of 5

How to insert a row below ActiveCell, copy row down, and add 'v1' to the existing number

  1. #1
    Registered User
    Join Date
    11-15-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    7

    Question How to insert a row below ActiveCell, copy row down, and add 'v1' to the existing number

    Greetings all,

    Well I'm six hours down without success, so I'd be extremely grateful for any help.

    Excel variation macro query.PNG

    What I'm trying to achieve is

    Select a cell in column A, lets say '004'
    Click Variation button
    Excel copies the entire row and inserts it below
    Excel adds v1 to the number so you end up with 004v1

    Really has me stumped!

    I have the drop down bit but not the adding of the v1

    Please Login or Register  to view this content.
    Last edited by jamesywilkinson; 11-22-2013 at 10:31 AM.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: How to insert a row below ActiveCell, copy row down, and add 'v1' to the existing numb

    Try:

    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    11-15-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: How to insert a row below ActiveCell, copy row down, and add 'v1' to the existing numb

    Thank you so much! You've managed in 6 minutes what I couldn't in 6 hours! It works, however it does drop the first two 0s, suspect converting to text would resolve that? will certainly give it a try

    Thanks again Olly

    J

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: How to insert a row below ActiveCell, copy row down, and add 'v1' to the existing numb

    Glad it's doing what you want. Hard to comment on the leading zeros on your number column, as I can't see how you have those cells formatted. The leading zeroes should stay if they're already formatted as text. If they're currently formatted as numbers with the format "000", then change the last line of code to;

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-15-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: How to insert a row below ActiveCell, copy row down, and add 'v1' to the existing numb

    Thank you so much! Works a treat!!

    Take the rest of the day off and have a good weekend!

    J

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 11
    Last Post: 11-04-2013, 04:32 PM
  2. Replies: 3
    Last Post: 10-14-2013, 03:06 PM
  3. Insert Number After Existing Data?
    By Mick2011 in forum Excel General
    Replies: 3
    Last Post: 11-30-2011, 03:30 AM
  4. Macro to copy existing workbook x number of times
    By jeffreybrown in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-05-2009, 11:03 AM
  5. How do I insert Text Box in ActiveCell
    By Borg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-15-2006, 03:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1