How do I copy only the month from a date
I need to copy just the month from one worksheet "A" to worksheet "B" in the
same work book so I can count the number of occurances in one month. I also have to copy the whole date in worksheet "A" to worksheet "B" in another column. Worksheet A Worksheet B Column 1 Worksheet B Collumn 2 To copy To paste To Paste 03/21/05 03 03/21/05 Worksheet B ,occasionally, gets sorted by date. Worksheet A will be data entry where leaving off the "0" occassionaly in the first 9 months will happen from time to time as human error. Worksheet A populates worksheet B and once worksheet A is populated the newly populated row in B is copied to the row below. Once copied to to the row below the data in A is deleted with the next set of data. Is this too much for excel and an ACCESS application. I just about have it in excel ecept for these two collumns. |
You can get the month of an actual date by using the MONTH(date) function.
It will return only a 3, not an 03. If you need two digits, use =TEXT(MONTH(date),"00") Just directly reference the date in Worksheet A to get it into Worksheet B. =date "CCW" wrote in message ... I need to copy just the month from one worksheet "A" to worksheet "B" in the same work book so I can count the number of occurances in one month. I also have to copy the whole date in worksheet "A" to worksheet "B" in another column. Worksheet A Worksheet B Column 1 Worksheet B Collumn 2 To copy To paste To Paste 03/21/05 03 03/21/05 Worksheet B ,occasionally, gets sorted by date. Worksheet A will be data entry where leaving off the "0" occassionaly in the first 9 months will happen from time to time as human error. Worksheet A populates worksheet B and once worksheet A is populated the newly populated row in B is copied to the row below. Once copied to to the row below the data in A is deleted with the next set of data. Is this too much for excel and an ACCESS application. I just about have it in excel ecept for these two collumns. |
ws2.cells(1,1) = month( ws1.cells(2,2))
-- | +-- Julian | "CCW" wrote in message ... I need to copy just the month from one worksheet "A" to worksheet "B" in the same work book so I can count the number of occurances in one month. I also have to copy the whole date in worksheet "A" to worksheet "B" in another column. Worksheet A Worksheet B Column 1 Worksheet B Collumn 2 To copy To paste To Paste 03/21/05 03 03/21/05 Worksheet B ,occasionally, gets sorted by date. Worksheet A will be data entry where leaving off the "0" occassionaly in the first 9 months will happen from time to time as human error. Worksheet A populates worksheet B and once worksheet A is populated the newly populated row in B is copied to the row below. Once copied to to the row below the data in A is deleted with the next set of data. Is this too much for excel and an ACCESS application. I just about have it in excel ecept for these two collumns. |
All times are GMT +1. The time now is 09:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com