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

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
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,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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