+ Reply to Thread
Results 1 to 10 of 10

How to fill an array with values in column C based on Column D date value of Today

  1. #1
    Forum Contributor
    Join Date
    04-15-2012
    Location
    California, USA
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    120

    How to fill an array with values in column C based on Column D date value of Today

    I am trying to search through Column D to find all dates = to today, then take the values in Column C and place them into a column in another workbook. I was attempting to do this in the same worksheet as a test but am having difficulty. I have some code I am working with but having trouble getting it to do what I need it to do. Workbook is attached as well

    Please Login or Register  to view this content.
    Last edited by jrtraylor; 01-10-2016 at 01:02 AM.

  2. #2
    Forum Contributor
    Join Date
    01-08-2016
    Location
    Cagayan De Oro City, Philippines
    MS-Off Ver
    2013
    Posts
    152

    Re: How to fill an array with values in column C based on Column D date value of Today

    Hi

    OK just replace the old code with this........... i updated it since the sample i sent you earlier

    Please Login or Register  to view this content.

    just give it a try, dont forget to change some dates to today

    Thanks
    Paul S.

  3. #3
    Forum Contributor
    Join Date
    04-15-2012
    Location
    California, USA
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    120

    Re: How to fill an array with values in column C based on Column D date value of Today

    It errors out (Subscript out of range) at this line

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    01-08-2016
    Location
    Cagayan De Oro City, Philippines
    MS-Off Ver
    2013
    Posts
    152

    Re: How to fill an array with values in column C based on Column D date value of Today

    Sorry

    Please Login or Register  to view this content.
    Try this

  5. #5
    Forum Contributor
    Join Date
    04-15-2012
    Location
    California, USA
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    120

    Re: How to fill an array with values in column C based on Column D date value of Today

    Ok, almost there, Now it is putting the Packing List # in the right spot, but it is only taking the first 3 instances where it finds the todays date. Then it is putting the Tracking # in the Project # column leaving the Tracking # column empty. See attached file. I changed a date in an earlier shipment to todays date and added one to the end for a total of 5 entries that would be on the shipping report for 1/9

  6. #6
    Forum Contributor
    Join Date
    01-08-2016
    Location
    Cagayan De Oro City, Philippines
    MS-Off Ver
    2013
    Posts
    152

    Re: How to fill an array with values in column C based on Column D date value of Today

    Oh my i missed something again

    Please Login or Register  to view this content.
    Change the 2 to a 1..... (TData,1)

    Sorry



    Also,switching the lines marked in red below should swap the left and right columns around if they are backwards....

    Please Login or Register  to view this content.
    Last edited by gbeats101; 01-10-2016 at 03:36 AM.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: How to fill an array with values in column C based on Column D date value of Today

    Totally different method...
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    01-08-2016
    Location
    Cagayan De Oro City, Philippines
    MS-Off Ver
    2013
    Posts
    152

    Re: How to fill an array with values in column C based on Column D date value of Today

    Wow if i need to obfuscate my work ill contact you .. joke

    interesting method.

  9. #9
    Forum Contributor
    Join Date
    04-15-2012
    Location
    California, USA
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    120

    Re: How to fill an array with values in column C based on Column D date value of Today

    Thanks for the help now I will try and mend it to work with separate workbooks.

  10. #10
    Forum Contributor
    Join Date
    01-08-2016
    Location
    Cagayan De Oro City, Philippines
    MS-Off Ver
    2013
    Posts
    152

    Re: How to fill an array with values in column C based on Column D date value of Today

    You just need to modify the Sub Header and a line or 2 of code.

    Please Login or Register  to view this content.
    then if you have a button your planning on putting on each sheet you can easily call this sub using the correct name.

    Code the 2015 sheets button to
    Please Login or Register  to view this content.
    This would require you create controls on each sheet and code them slightly diferent........ or you could use the current Year (2016) to determin where the new data is comming from or a textbox etc etc.

+ 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. storing multiple value in a single cell (through arrays or without arrays)?
    By mak51061 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-25-2014, 09:27 PM
  2. Declaring multiple multi-dimensional arrays (jagged arrays) - compile error?
    By dfribush in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-20-2013, 05:06 PM
  3. vba compare arrays and remove exact matching arrays
    By jacojvv in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-25-2013, 07:30 AM
  4. [SOLVED] New to arrays-where do I find a good beginners guide to multi dimensional arrays
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-04-2013, 07:44 PM
  5. Sum columns within arrays and then multiplying arrays [?]
    By slickpusher in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-08-2012, 08:50 PM
  6. Help With Arrays, real Basic Arrays
    By Markva in forum Excel General
    Replies: 3
    Last Post: 08-20-2008, 04:11 PM
  7. Arrays - declaration, adding values to arrays and calculation
    By Maxi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2006, 11:15 AM

Tags for this Thread

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