Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Matching Via Code

    I've got an excel spreadsheet with a column that has the date. We'll call it Cows.xls, column D has the date in format mm/dd/yy.

    I have another spreadsheet, we'll call it Chickens.xls, Column D has numbers 1 through 31 representing the day.

    How can I make the code recognize the date and put the data into the corresponding day #?
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  2. #2
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Matching Via Code

    Drk:

    I'm not quite sure what data you want to move in there, but see if the DAY( ) function applied against the Cows date gets you closer to where you wanna be.
    <font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Matching Via Code

    [prep
    Workbooks("Chickens").Worksheet("Sheet1").Range(A1 ).Offset(Day(Workbooks("Cows").Worksheets_
    ("Sheet1").Range("D1").Value)-1,0).Value = Data
    [/pre]

    Untested
    Legare Coleman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •