Copying Data To A New Sheet, Based On A Specific Week's Data

jeremy466clark

New Member
Joined
Jan 31, 2024
Messages
25
Office Version
  1. 365
Platform
  1. Windows
Hi There

I'm hoping someone can help me. I and some friends have a simple fun competition each week based on the Formula 1 season.

I won't bore you with the competition details, but on the "Main Data" tab shown in the attached 1st pic, I manually enter Points Scored by my friends each week for the race (in Columns C, G, K, O, S, W, AA, & AE), based on where the race is held (Rows B6:B29). I also manually enter the Week Number in Cell AJ1, which calculates the various various averages shown.

What I am trying to do is automatically copy the points from the "Main Data" tab (in Columns C, G, K, O, S, W, AA, & AE), purely for the most recent race / week, into the table on the "Points Summary" tab, Columns B15:B22, (See the 2nd pic attached) which I can then sort into numerical order so I have a graph showing purely for that week's points.

Is there a formula for this, or will it involve coding (which I know nothing about!)?

Any help is greatly appreciated.

Kind regards

Jeremy

"Main Data" Tab
Screenshot (31).png


"Points Summary" Tab
Screenshot (32).png
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
@jeremy466clark Assuming that the race number in Column A coincides with the Round number in AJ1 then see if the below helps.

Book3
ABC
13
14NameThis Week's Points
15Jez0
16Jo1
17Paul8
18Sara9
19Phil11
20Graeme15
21Kate17
22Julia18
23
Points Summary
Cell Formulas
RangeFormula
A15:B22A15=SORT(TRANSPOSE(CHOOSECOLS(CHOOSEROWS('Main data'!C3:AE29,1,'Main data'!AJ1+3),1,5,9,13,17,21,25,29)),2,1)
Dynamic array formulas.
 
Upvote 0
Solution
Hi Snakehips
Thanks so much for the very quick reply.
Forgive me if my questions are stupid, but I have very little experience with Excel.
Do I type the formula you have shown exactly as you have shown it? Or am I supposed to enter column & row numbers to replace where you have shown CHOOSECOLS(CHOOSEROWS ? If so, which column & row numbers do I enter?
And my 2nd stupid question......... In what cells am I typing the formula?
My apologies again
Looking forward to hearing from you again
Kind regards
Jeremy
 
Upvote 0
Jeremy, If I have interpreted your data correctly then enter the formula into A15 only on the Points Summary sheet.
The result will spill into the adjacent cells.
The formula ,as is, is using Excel functions CHOOSECOLS and CHOOSEROWS which are available in Excel 365.

My testing data below yields the result posted above.

Book3
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJ
112
2
3PhilJoSaraKatePaulJezGraemeJulia
4
5
611371720175207
721152001552
831813931261712
9413318126954
105171920161917179
11678203201163
127213819717163
1381611311101617
1491920819194714
15105121111200
1611010516141177
1712111917801518
1813
1914
2015
2116
2217
2318
2419
2520
2621
2722
28
Main data

HTH
 
Upvote 0
Oh wow!!!
Thanks so much, Snakehips.
Once I realised I had to delete all the previously entered figures and names in the weekly results table after entering your Formula in A15, it works like a dream.
Thanks again so much
Kind regards
Jeremy
 
Upvote 0
Sorry to bother you again @Snakehips
Purely for my own knowledge, can you explain in laymans terms exactly what the =SORT(TRANSPOSE(CHOOSECOLS(CHOOSEROWS('Main data'!C3:AE29,1,'Main data'!AJ1+3),1,5,9,13,17,21,25,29)),2,1) formula is actioning. It's working brilliantly, but I don't understand how :)
Thanks again
Jeremy
 
Upvote 0
Jeremy,
Your main data range is 'Main data'!C3:AE29 the name being in row 1 of that range and the races below, starting in row 4.
'Main data'!AJ1 holds the Round No. that corresponds with a Race No of interest. The Race No. of interest will be found in row Race No. + 3 of the main data or Round No. + 3.
Hence we know that AJ1 + 3 is the row (within the data range) of the race of interest.
Using race 12 as our example:
Excel Formula:
CHOOSEROWS('Main data'!C3:AE29,1,'Main data'!AJ1+3)
Extracts two rows only from the data range. Rows 1 (Names) and 15 (Race 12)
From that ^^
Excel Formula:
CHOOSECOLS(CHOOSEROWS('Main data'!C3:AE29,1,'Main data'!AJ1+3),1,5,9,13,17,21,25,29
extracts the first then every fourth column that will contain the names and their points for Race 12.
TRANSPOSE(^^^^) converts the resulting array into two columns.
SORT(^^^^,2,1). sorts the above by column 2 (Points) in ascending order.

It only requires the formula in one cell as the 365 functions used are dynamic and spill automatically.

If you put
Excel Formula:
=CHOOSEROWS('Main data'!C3:AE29,1,'Main data'!AJ1+3)
. in a spare cell that is not hindered to the right by other data you will see its sub result.
Similarly with
Excel Formula:
 =CHOOSECOLS(CHOOSEROWS('Main data'!C3:AE29,1,'Main data'!AJ1+3),1,5,9,13,17,21,25,29)
. etc

HTH
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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