Computating Dates based on date in a cell

gemcgraw

Board Regular
Joined
Mar 11, 2011
Messages
72
I know this has to be so simple and easy but I'm totally drawing a blank. I don't want to use simple in-cell formulas to accomplish this as it can be easily wiped out. I'd rather do a behind-the-scene VB coding.

I need to take Monday's date in cell A1 and calculate Tue-Fri dates in B1, C1, D1, and E1 based on A1. Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Try:
Code:
Sub DateCalc()

Application.ScreenUpdating = False

For i = 2 To 5
    Cells(1, i) = Range("A1") + i - 1
Next i
Range("A1:E1").EntireColumn.AutoFit

Application.ScreenUpdating = True

End Sub
 
Upvote 0
That is exactly what I need. Thank you so much Jack!

Try:
Code:
Sub DateCalc()

Application.ScreenUpdating = False

For i = 2 To 5
    Cells(1, i) = Range("A1") + i - 1
Next i
Range("A1:E1").EntireColumn.AutoFit

Application.ScreenUpdating = True

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,845
Messages
6,181,298
Members
453,030
Latest member
PG626

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top