ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Convert dates into codes (https://www.excelbanter.com/excel-discussion-misc-queries/43248-convert-dates-into-codes.html)

Davin

Convert dates into codes
 
I have to import a file into Excel once per week. The data could change on
any record going back to the 1st of the year. It is run for the whole year
every week.

I am doing counts on many things broken out by week. I need to convert
(automatically) the date into a code number (1/01/05 = 1; 1/10/05 = 2...) so
that as I import or paste the new weekly data into the spreadsheet the date
will automatically update a new field with the corresponding code.

I can't seem to get it to work, I was hoping one of ya'll mught have an idea.

Thanks in advance for any info!

David Hepner

Two suggestions:

You could use the weeknum function to convert a date into the week number.
-or-
You could create a table with the weeks in one column and the corresponding
number in the next and use a vlookup.



"Davin" wrote:

I have to import a file into Excel once per week. The data could change on
any record going back to the 1st of the year. It is run for the whole year
every week.

I am doing counts on many things broken out by week. I need to convert
(automatically) the date into a code number (1/01/05 = 1; 1/10/05 = 2...) so
that as I import or paste the new weekly data into the spreadsheet the date
will automatically update a new field with the corresponding code.

I can't seem to get it to work, I was hoping one of ya'll mught have an idea.

Thanks in advance for any info!


Davin

Perfect!

Thanks a lot, just the "idea push" I needed. I went with the vlookup
solution and it worked like a charm.


"David Hepner" wrote:

Two suggestions:

You could use the weeknum function to convert a date into the week number.
-or-
You could create a table with the weeks in one column and the corresponding
number in the next and use a vlookup.



"Davin" wrote:

I have to import a file into Excel once per week. The data could change on
any record going back to the 1st of the year. It is run for the whole year
every week.

I am doing counts on many things broken out by week. I need to convert
(automatically) the date into a code number (1/01/05 = 1; 1/10/05 = 2...) so
that as I import or paste the new weekly data into the spreadsheet the date
will automatically update a new field with the corresponding code.

I can't seem to get it to work, I was hoping one of ya'll mught have an idea.

Thanks in advance for any info!



All times are GMT +1. The time now is 08:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com