Date+7 formula in Table Header not working

Melimob

Active Member
Joined
Oct 16, 2011
Messages
395
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
10-Jun17-Jun24-Jun01-Jul08-Jul15-Jul

<tbody>
</tbody>

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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
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,214,419
Messages
6,119,389
Members
448,891
Latest member
tpierce

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