• Matching Via Code

    • This topic has 2 replies, 3 voices, and was last updated 24 years ago.
    Author
    Topic
    #353967

    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 #?

    Viewing 1 reply thread
    Author
    Replies
    • #519065

      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.

    • #519072

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

      Untested

    Viewing 1 reply thread
    Reply To: Matching Via Code

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: