elnahasadam

New Member
Joined
Nov 22, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I am trying to make a randomizer in Excel to randomize my workouts. I currently have 4 workout lists in Excel: Abs, Arms, Chest, and Legs. The lists are made of strings with no numbers. What I want to do, is to have 3 different buttons, each for a different day (Arm, Chest, and Leg). Upon pressing the button, I want a table with workouts randomly selected from the respective list to be generated in Excel, but I also want each of the workouts to have some of the workouts from the Abs section as well. For example, if it is "Arm Day", I want to press an "Arm Day" button and a table is generated for me with randomly selected arm workouts, but also randomly selected ab workouts as well. Then when the next day comes and I press the "Chest Day" button, I want it to generate a similar table that pops up directly underneath the table the day before (so the previous day doesn't get deleted). Does anyone know how I can go about creating this? I only know the basics of Excel but I would like to learn how this may be possible because it is going to be my Christmas present to a friend.

I would also like the table to have the date and the workout type listed (such as "Arm Day") but these are additional aspects that do not necessarily need to be added immediately.
Thank you.

*In the picture, the blue highlighted cells are cells that I have not come up for workouts for but they may be filled later in case I can think of a new workout so I would also like those included too.*
 

Attachments

  • Workout Randomizer.jpg
    Workout Randomizer.jpg
    188.8 KB · Views: 73

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi Elna,

I've built the following see if this suits, the formula randbetween generates random numbers when the sheet calculates.
Click the Refresh shape and find a workout set that suits, click Record shape and copy each workout day to the workout table below the builder area (Workout Log header should be from A22)
You can click the Clear log button at any time to Clear the log for a new workout week.
  • Workout Log B2 Automatically changes date based on today
  • Workout Log B3 you can set how many Sets you need up to 12 max
  • Workout Log B4 there is a drop down for Muscle group or you can build Shapes to change the Group
  • On the Workout Table Tab you can enter more exercises to add to your regime and makes the random workout numbers
** Note that the Abs exercise split depends on how many movements you have in the selected group

This is the Workout builder area, you can refresh, record your Workout

Cell Formulas
RangeFormula
A7:A14A7=IF(C7="","",$B$2)
B7:B14B7=IF(C7="","",$B$4)
C7:C14C7=IF(ROWS($C$7:C7)>$B$3,"",ROWS($C$7:C7))
D7:D14D7=IFERROR(LARGE(UNIQUE(FILTER(Table1[Random],Table1[Random]<>"")),C7),"")
E7:E14E7=IF(D7="","",INDEX(Table1[Group],MATCH(D7,Table1[Random],0)))
F7:F14F7=IF(D7="","",INDEX(Table1[Exercise],MATCH(D7,Table1[Random],0)))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A7:F18Expression=ISNUMBER($C7)textNO
Cells with Data Validation
CellAllowCriteria
B4List=Group


Workout Table Tab (Table1)

Workout Randomizer_elnahasa.xlsm
ABCDE
1GroupExerciseRandomExcercises
2AbsWeighted Plank 1min2Abs
3AbsRussian Twists 1min9Shoulder / Arm
4AbsSupermans 1min11Chest / Back
5AbsSally Push up 1min13Legs / Lumbar
6Abs6 inches Weighted 1min9
7AbsFlutter Kicks 1min3
8AbsBicycle 1min17
9AbsLeg Raises 1min18
10AbsLeg Raise Pull-up Bar 1min29
11AbsSally Plank 1min17
12AbsPenguins 1min35
13Shoulder / ArmBicep Curls 3x527
14Shoulder / ArmTricep Ext 3x610
15Shoulder / ArmStrict Press 3x635
16Shoulder / ArmCross Curls 3x540
17Shoulder / ArmHammer Curls 3x621
18Shoulder / ArmCable Curls 3x712
19Shoulder / ArmSeated Cable Curls 3x826
20Shoulder / ArmWeighted Tricep Dips 3x935
21Shoulder / ArmShoulder Shrugs 2x1536
22Shoulder / ArmConcentration curls 3x517
23Shoulder / ArmShoulder Press 3x62
24Shoulder / ArmArnolds 3x624
25Shoulder / ArmStrict Arm Strict Press 3x521
26Chest / BackFront Raises 3x6 
27Chest / BackBench 3x7 
28Chest / BackInclined Bench 3x8 
29Chest / BackBench Press Dumbells 3x9 
30Chest / BackInclined Bench Press DB 3x5 
31Chest / BackUpright Rows 3x6 
32Chest / BackSingle Arm Upright Rows 3x6 
33Chest / BackDecline Bench Press 3x5 
34Chest / BackRenegade Rows 3x6 
35Chest / BackPush up Series 3x7 
36Chest / BackSingle Arm Rows 3x8 
37Chest / BackLat Pulldowns 3x9 
38Chest / BackChest Fly 3x8 
39Chest / BackBurpess / Manmakers 3x8 
40Legs / LumbarSquats 2x15 
41Legs / LumbarDeadlifts 3x5 
42Legs / LumbarGoblet Squats 3x6 
43Legs / LumbarBar Lunges 3x6 
Workout Table
Cell Formulas
RangeFormula
E2:E5E2=UNIQUE(Table1[Group])
C2:C43C2=IF(OR([@Group]="Abs",[@Group]='Workout Log'!$B$4),RANDBETWEEN(1,COUNTA([Group])),"")
Dynamic array formulas.


Create a Rectangle: Rounded Corners Shape "Refresh" assign the follow code
VBA Code:
' Macro1 Macro
'
    Calculate
Create a Rectangle: Rounded Corners Shape "Record"
VBA Code:
Dim rg As Range

Set rg = ThisWorkbook.Worksheets("Workout Log").Range("Workout")

Application.ScreenUpdating = False

rg.Select
    Selection.Copy
        ThisWorkbook.Worksheets("Workout Log").Range("A10000").End(xlUp).Offset(1).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Application.CutCopyMode = False
ThisWorkbook.Worksheets("Workout Log").Range("B4").Select

Application.ScreenUpdating = True
Create a Rectangle: Rounded Corners Shape "Clear Log"
VBA Code:
Dim rec As Range

Set rec = ThisWorkbook.Worksheets("Workout Log").Range("A22").CurrentRegion

rec.Offset(1).ClearContents
Create a Rectangle: Rounded Corners Shape "Chest / Back"
VBA Code:
Sheets("Workout Log").Range("b4").Value = "Chest / Back"

repeat shapes for "Legs / Lumbar" & "Shoulder Arm"

Workout Regime ( List Layout based on Workout Table1) I have this next to the Workout builder on my sheet

Workout Randomizer_elnahasa.xlsm
HIJK
1AbsShoulder / ArmChest / BackLegs / Lumbar
2Weighted Plank 1minBicep Curls 3x5Front Raises 3x6Squats 2x15
3Russian Twists 1minTricep Ext 3x6Bench 3x7Deadlifts 3x5
4Supermans 1minStrict Press 3x6Inclined Bench 3x8Goblet Squats 3x6
5Sally Push up 1minCross Curls 3x5Bench Press Dumbells 3x9Bar Lunges 3x6
66 inches Weighted 1minHammer Curls 3x6Inclined Bench Press DB 3x5
7Flutter Kicks 1minCable Curls 3x7Upright Rows 3x6
8Bicycle 1minSeated Cable Curls 3x8Single Arm Upright Rows 3x6
9Leg Raises 1minWeighted Tricep Dips 3x9Decline Bench Press 3x5
10Leg Raise Pull-up Bar 1minShoulder Shrugs 2x15Renegade Rows 3x6
11Sally Plank 1minConcentration curls 3x5Push up Series 3x7
12Penguins 1minShoulder Press 3x6Single Arm Rows 3x8
13Arnolds 3x6Lat Pulldowns 3x9
14Strict Arm Strict Press 3x5Chest Fly 3x8
15Burpess / Manmakers 3x8
Workout Log
Cell Formulas
RangeFormula
H2:H12,K2:K5,J2:J15,I2:I14H2=FILTER(Table1[Exercise],Table1[Group]=H$1)
Dynamic array formulas.


Workout Log example

Workout Randomizer_elnahasa.xlsm
ABCDEF
22DateSets(R) Workouts #GroupExercise
23WedShoulder / Arm142Shoulder / ArmSeated Cable Curls 3x8
24WedShoulder / Arm241Shoulder / ArmShoulder Shrugs 2x15
25WedShoulder / Arm340AbsLeg Raise Pull-up Bar 1min
26WedShoulder / Arm437AbsBicycle 1min
27ThuShoulder / Arm139Shoulder / ArmStrict Press 3x6
28ThuShoulder / Arm233Shoulder / ArmSeated Cable Curls 3x8
29ThuShoulder / Arm332Shoulder / ArmShoulder Press 3x6
30ThuShoulder / Arm431Shoulder / ArmConcentration curls 3x5
Workout Log
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A7:F18,A23:F51Expression=ISNUMBER($C7)textNO
 

Attachments

  • Capture.JPG
    Capture.JPG
    82.6 KB · Views: 26
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,691
Members
448,978
Latest member
rrauni

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