Date+7 formula in Table Header not working

Melimob

Active Member
Joined
Oct 16, 2011
Messages
396
Office Version
  1. 365
Hi

I have a table where the headers are weeks.
I want the user to update the first column header and the subsequent headers would update by each week.

e.g. Column A is 10-Jun and formula in column b onwards is A1+7 etc
[TABLE="width: 384"]
<tbody>[TR]
[TD="class: xl77, width: 64"]10-Jun[/TD]
[TD="class: xl77, width: 64"]17-Jun[/TD]
[TD="class: xl77, width: 64"]24-Jun[/TD]
[TD="class: xl77, width: 64"]01-Jul[/TD]
[TD="class: xl77, width: 64"]08-Jul[/TD]
[TD="class: xl77, width: 64"]15-Jul
[/TD]
[/TR]
</tbody>[/TABLE]

If I drag the formula in a table it doesn't work unless it's in a table?

any way round this?

Many thanks
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
It will happily work if it isnt a table. You put the date in A1. Put the formula in B1 and then drag just B1, not A1 and B1, to the right.
 
Upvote 0
You could use a macro if you wanted? Change the sheet and table name to suit.

Code:
With Sheets("Sheet1")
    d = CDate(.ListObjects("Table1").HeaderRowRange(1))
    For Each c In .ListObjects("Table1").HeaderRowRange.Cells
        c.Value = d
        d = d + 7
    Next
End With
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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