AUTOFILL ACROSS/HORIZONTALLY ISSUE

Data123

Board Regular
Joined
Feb 15, 2024
Messages
80
Office Version
  1. 365
Platform
  1. Windows
hi I have a sheet named "data" with data that looks like this in figure "a" below.

then in another sheet named "weekly scores" see fig b. i use this formula to get david's scores for cells b2 and f2 =('data'!B2-'data'!F2)/'data'!F2*100

i would like to autofill across, in the "weekly scores" sheet (fig b), but when i do the autofill gives me the wrong column letters that are calculated. how can i fix this please?


fig a

A B C D E F

Date2024-12-202024-12-192024-12-182024-12-172024-12-16
David3533.7633.1634.7634.12

fig b
A B
Week 1Week 2
2.58
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try for instance:
Excel Formula:
=LET(weekN,COLUMNS($A1:A1),startD,INDEX(2:2,1,5*weekN+1),endD,INDEX(2:2,1,5*weekN-3),(endD-startD)/startD*100)
and copy it to right as needed.

Another option:
use empty row for this formula, because it spills to the right:
Excel Formula:
=LET(weekN,SEQUENCE(1,3),startD,INDEX(2:2,1,5*weekN+1),endD,INDEX(2:2,1,5*weekN-3),IFERROR((endD-startD)/startD*100,""))
and change 3 (sequence second argument) to number of weeks you want to have filled
 
Upvote 0
PS. Yet another step - automatic calculation of weeks data available based on dates in row 1
Excel Formula:
=LET(weekN,SEQUENCE(1,INT(COUNT(data!$1:$1)/5)),startD,INDEX(2:2,1,5*weekN+1),endD,INDEX(2:2,1,5*weekN-3),(endD-startD)/startD*100)
Again write it only in first cell it will spill to the right as needed.

PS. in such questions sample data for second week and expected result for it are always a good idea.
Here at first it looked rather clear, but may be it is not.

The formula above (and formulas in previous post) assume you have only working days in row 1. If you have there also weekends you may try:
Excel Formula:
=LET(weekN,SEQUENCE(1,ROUNDUP(COUNT(data!$1:$1)/7,0)),startD,INDEX(2:2,1,7*weekN-1),endD,INDEX(2:2,1,7*weekN-5),(endD-startD)/startD*100)
and similar modifications (7*weekN and changed number deducted after) in formulas from my previous post
 
Last edited:
Upvote 0

Forum statistics

Threads
1,225,204
Messages
6,183,577
Members
453,170
Latest member
sameer98

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