Results 1 to 9 of 9

Insert rows and copying values if cells contain values

Threaded View

  1. #1
    Registered User
    Join Date
    11-23-2011
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    7

    Insert rows and copying values if cells contain values

    Hey Guys,

    I want to create a macro in Excel. An example of the data is added to this thread.

    First thing you notice when you open the data is the top row with all the different variables.
    Now as you notice this line of data is just one out of a bigger dataset. You also see that not every cell has got a value, this is normal. What I want to achieve is some kind of a transpose, I guess, but I have illustrated this in the dataset as well.

    First Thing:
    So what I need is when a cell contains a value, for instance cell N2, I need the variable name, in this case it's "g", to be copied to the first cell. Then I need the corresponding value, this is 2 in this case, and I also need the corresponding value next to this variable, this is cell O2 and corresponds to 5.
    I call these variables "row specific" since every row will be unique, and the number of rows will be depended on how many cells contain a value. In this case only 2 cells contain a value (yes, 4 indeed but "g and b01g" belong together as do "j" and "b01j").

    Second Thing:
    There are also "fixed" variables. The values of these variables need to be copied as well to the different rows. An example is "ID", cell A2. Other examples are "Fixed" (cell AH2) and "Bpost" (cell AI2).

    Anyways, hope someone can help me and let me know if more explanation is needed!

    Sincerely
    Attached Files Attached Files
    Last edited by Waninio; 12-12-2011 at 07:20 PM.

Thread Information

Users Browsing this Thread

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

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