+ Reply to Thread
Results 1 to 5 of 5

Copy each row data of row headers with same value in one column. Help?

  1. #1
    Registered User
    Join Date
    05-02-2015
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    47

    Copy each row data of row headers with same value in one column. Help?

    So first I will choose the source file. Say I want to enter a name from the given sample. Then, I want to take all the amount and purpose under that name and paste it to the corresponding cells in the worksheet where i'm running vba. I dont know how to modify the code. Any help or leads on how I will start? Thanks in advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: Copy each row data of row headers with same value in one column. Help?

    hi zoenightshade,

    i don't understand what you're trying to accomplish? this code looks like it's working fine (in fact i learned a few things while reading it). in what way are you trying to modify it?
    Hope I could help - if your post has been solved don't forget to mark it as such.

    Clicking the * below is a great way to say thanks!

    "Drowning in 10 feet of water isn?t any different than drowning in a million feet. And if you can swim, it doesn?t matter how deep the ocean is. At some level, once you realize you?re in water that?s too deep to stand, you have to have a very different approach," - Joi Ito

  3. #3
    Registered User
    Join Date
    05-02-2015
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    47

    Re: Copy each row data of row headers with same value in one column. Help?

    hi! thank you for responding. If you havent noticed, for example, in column C, i have multiple Rose Dix. However, the values of amount and purpose of each Rose Dix varies in every row. I want to get the other two values of amount and purpose and paste it in the corresponding cells instead of just the first one.

  4. #4
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: Copy each row data of row headers with same value in one column. Help?

    ah! i missed that. looks like you'll need the findall function from our good friend Chip Pearson (who's website seems to be down, or perhaps my company firewall is blocking it otherwise i'd post the link... google chip pearson findall for his site and description of the code)

    paste this into module 1:
    Please Login or Register  to view this content.
    then you have to make just a few tweaks to your original code, this seems to be working:
    Please Login or Register  to view this content.
    couple things i'm noticing - there doesn't appear to be any place to store the invoice #, date or person approved for the subsequent instances of Rose Dix... this code is currently capturing the last instance... is that ok?

  5. #5
    Registered User
    Join Date
    05-02-2015
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    47

    Re: Copy each row data of row headers with same value in one column. Help?

    no, sir! it's definitely fine! all i need is the subsequent amount and purpose. im gonna try it later. thank you so much sir!
    Last edited by zoenightshade; 05-09-2015 at 01:54 AM.

+ 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. Help required with Macro to Copy Data based on Column Headers - please!
    By Andycostin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-02-2014, 05:45 PM
  2. Replies: 2
    Last Post: 09-18-2014, 05:42 AM
  3. [SOLVED] How to Copy a filter data with headers, excluding the headers?
    By Elomaldo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-16-2014, 03:35 PM
  4. [SOLVED] VBA code to copy column data only if headers match
    By rocksan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-13-2012, 11:23 PM
  5. Match Headers from raw worksheet and copy all data from that column
    By tms12 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2012, 08:00 AM

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