Results 1 to 2 of 2

Thread: Extracting a date from a column and appending another column's data to it

  1. #1

    Extracting a date from a column and appending another column's data to it



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I have a file that has a column of dates in DD-MON-YYYY format. I want to create a corresponding column that looks at the original data, determines what the year is and puts the year only value in the new column.

    I also have another column that has about ten choices of verbs that I would like to create a column that appends this verb to the year.

    So if I have “21-NOV-2012” in the first column, and “DIE CAST” in the second column, I would somehow like to end up with a column that has “2012 DIE CAST” as my final output.

    It doesn’t matter if I do this in one cell of formula, or if I have to set up multiple cells to achieve it.

    So far I have been messing around with IF statements combined with DATE and YEAR statements and nothing seems to give me what I need.

    Can anyone help?

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,225
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    Assuming your data starts in row 3:

    =YEAR(A3)&" "&B3
    Ken Puls, FCPA, FCMA, MS MVP (Excel)

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training) or with my book M is for Data Monkey!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Tags for this Thread

Posting Permissions

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