简体   繁体   中英

Autofill date range into excel Cell

I want to insert a date range into my excel sheet. One cell shall contain a date range like this one.

  1. Feb - 6. Feb Or

1-Feb to 6-Feb Or

1st Feb to 6th Feb

Then i want to drag it and autofill it for the rest of the year.

You can do this by starting with two separate columns, putting in the appropriate dates side by side and then autofilling down for the year. Then in the third columns put in this formula '=TEXT(A2,"mmm d")&"-"&TEXT(B2,"mmm d")' this will give you the format of 'feb 1-feb 6.' You can adjust the "mmm d" portion of the formula to change the format. Now autofill the third column down.

If you want to get rid of the original two columns, you can select the third column, hit 'ctrl + C' and then 'Ctrl + alt + V' and select values. After doing this you can delete the other two columns without affecting your new column.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM