+ Reply to Thread
Results 1 to 17 of 17

Searching month in data and copy specific value from column vba

  1. #1
    Forum Contributor
    Join Date
    08-18-2018
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    141

    Searching month in data and copy specific value from column vba

    I have a table below which is the source, information which might have 100 rows or more. Then I have another table in the same sheet with Months Header which also be dynamic but it will be until December. I need to copy all the Names in the Months column while looking at their birthday. How to do that in vba in dynamic way? Thank you.

    Source
    Name Address Birthday Email Address Team
    Joe Canada 03-Jun-1986 [email protected] Team1
    Marie Switzerland 21-Jan-1977 [email protected] Team2
    Desirie Malaysia 26-Jul-1988 [email protected] Team3
    Elise Japan 07-Aug-1990 [email protected] Team4
    John Singapore 31-Jan-1991 [email protected] Team5

    Destination
    January February March April May June July August September October November December


    Outcome would be:

    January February March April May June July August September October November December
    John Joe Desirie Elise
    Marie
    Last edited by dummy777; 12-16-2020 at 07:47 AM. Reason: tables

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,143

    Re: Searching month in data and copy specific value from column vba

    Maybe some "xls" sample ?

  3. #3
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Searching month in data and copy specific value from column vba

    The data starts with A1.
    Final results start with H1 - January, I1 - February, J1 - March, ... and so on.
    Please Login or Register  to view this content.
    Best Regards,
    Maras.

  4. #4
    Forum Contributor
    Join Date
    08-18-2018
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    141

    Re: Searching month in data and copy specific value from column vba

    Thank you very much Maras! It really does work! But how can I move the Final Result from H1 to A10 as it should be at the end of the source and should be dynamic? I tried to change it but nothing happens.

  5. #5
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,709

    Re: Searching month in data and copy specific value from column vba

    This is another option ...

    Please Login or Register  to view this content.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  6. #6
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Searching month in data and copy specific value from column vba

    Replace 'BirthDay' only code, function not.
    New 'BirthDay'.
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    08-18-2018
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    141

    Re: Searching month in data and copy specific value from column vba

    Thank you very much both Maras and nankw83! Both codes are working and dynamic! You're awesome!

  8. #8
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,709

    Re: Searching month in data and copy specific value from column vba

    Glad to help & thanks for the added rep. ... This is one more option without loops

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    08-18-2018
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    141

    Re: Searching month in data and copy specific value from column vba

    Thank you nankw83 for the option w/o loops, it also have the same results! I changed below if I need a fixed columns for Final Results. Thank you very much!

    Please Login or Register  to view this content.
    Last edited by dummy777; 12-17-2020 at 08:09 AM.

  10. #10
    Registered User
    Join Date
    12-06-2020
    Location
    Forl', Italy
    MS-Off Ver
    Office 2019
    Posts
    20

    Re: Searching month in data and copy specific value from column vba

    Another solution.
    Sheet1 is the source, Sheet2 the destination.

    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    08-18-2018
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    141

    Re: Searching month in data and copy specific value from column vba

    Is it also possible to add colors in the cell for those values that been paste in the Final Results?

  12. #12
    Forum Contributor
    Join Date
    08-18-2018
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    141

    Re: Searching month in data and copy specific value from column vba

    Thanks Bruno, but upon using the code my excel keeps on not responding.

  13. #13
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,709

    Re: Searching month in data and copy specific value from column vba

    Quote Originally Posted by dummy777 View Post
    Is it also possible to add colors in the cell for those values that been paste in the Final Results?
    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    08-18-2018
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    141

    Re: Searching month in data and copy specific value from column vba

    Thank you nankw83! Please also add color to this? I'm using your code like this

    Please Login or Register  to view this content.

  15. #15
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,709

    Re: Searching month in data and copy specific value from column vba

    Try this ...

    Please Login or Register  to view this content.

  16. #16
    Forum Contributor
    Join Date
    08-18-2018
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    141

    Re: Searching month in data and copy specific value from column vba

    Thank you very much nankw83! You're a gem! It works, I updated it to this if I need a fixed header for the month! I will use the other code if I need dynamic month headers and the other one w/o loops. You always help me and I learn so much in this forum Thank you all for your answers!

    Please Login or Register  to view this content.
    Last edited by dummy777; 12-18-2020 at 06:28 AM.

  17. #17
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,709

    Re: Searching month in data and copy specific value from column vba

    Glad to help & thanks for your kinds words

+ 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. [SOLVED] Check name of the Month and copy to specific column
    By SirMaceOne in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-18-2019, 09:56 PM
  2. [SOLVED] How to copy Specific Column data to specific Cell .
    By drp99246 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-18-2017, 10:22 AM
  3. Replies: 2
    Last Post: 09-28-2015, 07:57 PM
  4. [SOLVED] macro to copy specific columns and rows for a specific month and week
    By Shellybelly in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2015, 11:23 AM
  5. Searching Columns for a particular month then moving data from that column to User Form
    By Devianey26 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2014, 08:11 AM
  6. Replies: 3
    Last Post: 03-11-2014, 02:16 AM
  7. Copy data in Specific column in a specific range
    By macrofan2012 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-14-2012, 01:27 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