+ Reply to Thread
Results 1 to 7 of 7

Macro to pull info from column down to other cells

  1. #1
    Registered User
    Join Date
    01-15-2019
    Location
    Miami
    MS-Off Ver
    2016
    Posts
    66

    Macro to pull info from column down to other cells

    Hi!

    I wonder if someone can help me with a macro that I can't seem to figure out.

    I export a report from another system into Excel and it comes out with headers on the top of the left column and the data related to those headers on the right column below. I'd like to know if there's a macro that can pull the headers down to be next to the data until it reaches the next header and then repeats the same for that one and so on and then deletes the original headers. The count of rows for each category can be different every time I generate the report as is the total row count.

    So basically, "Case A" is the header in A2 and Bottles, wood, boxes, etc. are the items for this category that are in B3, B4, B5, etc. I'd like a macro where Case A gets placed in A3, A4, A5, etc and then deleted from A2, so it's only to the left of the actual items from that category.

    I uploaded the excel file here to show how it looks and below is how I'd like it to look after I run the macro.

    How I want the report to look:

    Case A Bottles 1,000.00
    Case A Wood 1,000.00
    Case A Boxes 6,000.00
    Case A Furniture 1,000.00
    Case A Media 3,000.00
    Case A Paper 2,000.00
    Case B DX 300.00
    Case B Domain 3,300.00
    Case B Bio 39,000.00
    Case B Surgical 700.00
    Case B Test 3,000.00
    Case C Engineer 1,000.00
    Case C Planning 3,500.00
    Case C Mgmt 1,000.00
    Case C Coding 1,750.00


    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    05-12-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    266

    Re: Macro to pull info from column down to other cells

    try this one:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-15-2019
    Location
    Miami
    MS-Off Ver
    2016
    Posts
    66

    Re: Macro to pull info from column down to other cells

    Thanks so much SjonR. It works! Just one question.. Is there something I can add to the macro to delete the blank rows that are left after it deletes the original headers so that there are no spaces between each category?

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,104

    Re: Macro to pull info from column down to other cells

    How about
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-15-2019
    Location
    Miami
    MS-Off Ver
    2016
    Posts
    66

    Re: Macro to pull info from column down to other cells

    Awesome! Thanks so much!!

  6. #6
    Forum Contributor
    Join Date
    05-12-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    266

    Re: Macro to pull info from column down to other cells

    try:

    Please Login or Register  to view this content.

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,104

    Re: Macro to pull info from column down to other cells

    Quote Originally Posted by luajambeiro View Post
    Awesome! Thanks so much!!
    You're welcome & thanks for the feedback

+ 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. Macro to unlock cells in design mode and pull info from several files into 1
    By luajambeiro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-16-2019, 12:51 PM
  2. Match names in two separate column if = then pull info in 3 column
    By Bevg in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-07-2013, 08:31 PM
  3. How to have vlookup pull in info from two different cells into one cell
    By yobroham in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-21-2013, 02:52 PM
  4. Replies: 1
    Last Post: 04-23-2012, 02:03 AM
  5. Need a macro to pull info from ini files.
    By 112233 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-18-2012, 11:20 AM
  6. Macro to pull info from 2 cells and provide output in third cell
    By YBA in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-19-2011, 08:45 PM
  7. Pull over only rows that have info in a certain column
    By johnnybs in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-10-2011, 07:49 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