Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-12-2024, 10:28 PM
ImAhNoBoDy ImAhNoBoDy is offline Reference Formula and cell reference Windows 7 64bit Reference Formula and cell reference Office 2007
Novice
Reference Formula and cell reference
 
Join Date: Jan 2012
Posts: 17
ImAhNoBoDy is on a distinguished road
Default Reference Formula and cell reference

I have a spreadsheet that is based on benching (weight lifting). The cells currently increase by 5lbs everyday. By day 4 the weight increases by 2.5lb everyday. In Day 5, I never copied the new formula from day 4 to the rest of the days ahead, so day 5 is increasing by 5lb and that's not what I want. It should be increased by 2.5lb everyday.

Is there a formula I could use that would reference the previous day and increase the weight appropriately without copying the formula everytime the weight increase is changed?



I wasn't sure if FORMULATEXT was appropriate and tried searching for a solution to this and couldn't come up with something. Any help would be appreciated. Thanks.
Attached Files
File Type: xlsx Benching.xlsx (9.3 KB, 9 views)
Reply With Quote
  #2  
Old 10-13-2024, 03:27 AM
p45cal's Avatar
p45cal p45cal is offline Reference Formula and cell reference Windows 10 Reference Formula and cell reference Office 2021
Expert
 
Join Date: Apr 2014
Posts: 947
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

in the attached,
  • Adjust the green cells' values in row 4; this is the daily increase in weight (can be negative)
  • Adjust how long that increase should apply for in the green cells in row 2
  • Hide row 3
  • Change starting weight in cell C7
  • The formula in cell D7 is the one that can be copied across as far as you need.
  • Row 13 is only there to demonstrate how the weight increments have been applied, can be deleted.
There's probably a slicker way.
Attached Files
File Type: xlsx MSOfficeForums52907Benching.xlsx (12.0 KB, 5 views)
File Type: xlsx MSOfficeForums52907BenchingForExcel2010.xlsx (12.8 KB, 2 views)

Last edited by p45cal; 10-13-2024 at 02:22 PM.
Reply With Quote
  #3  
Old 10-14-2024, 09:46 AM
ImAhNoBoDy ImAhNoBoDy is offline Reference Formula and cell reference Windows 7 64bit Reference Formula and cell reference Office 2007
Novice
Reference Formula and cell reference
 
Join Date: Jan 2012
Posts: 17
ImAhNoBoDy is on a distinguished road
Default

When it comes to weight training, I never know how long I will be using the same weight increase. Using my excel sheet as my example, my thinking was, I would have to manually change the cell reference when the weight increase changes.

C5 - 100
D5 - =SUM(C5+E$2$)
E5 - =FORMULATEXT(D5), get cell that references the weight increase (E$2$)
F5 - =SUM(E5+F$2$), weights are getting heavier, so I have to increase weight slower
G5 - =FORMULATEXT(F5), get cell that references the weight increase (F$2$)
H5 - =FORMULATEXT(F5), get cell that references the weight increase (F$2$)
I5 - =FORMULATEXT(F5), get cell that references the weight increase (F$2$)
J5 - =SUM(I5+F$2$), weights are getting heavier, so I have to increase weight slower

Obvious, I would need something a function to turn the text into an expression of some sort.
Reply With Quote
  #4  
Old 10-14-2024, 10:35 AM
p45cal's Avatar
p45cal p45cal is offline Reference Formula and cell reference Windows 10 Reference Formula and cell reference Office 2021
Expert
 
Join Date: Apr 2014
Posts: 947
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Quote:
Originally Posted by ImAhNoBoDy View Post
I would have to manually change the cell reference when the weight increase changes.
In the files I attached, adjust the green cells in row 2, you will immediately see the effect in row 7. If you want no change in weight for a period, put a zero in the appropriate green cell in row 4 and the number of days you want to stay at that weight in the corresponding green cell above it in row 2.


2024-10-14_184802.jpg
Reply With Quote
  #5  
Old 10-15-2024, 08:34 AM
ImAhNoBoDy ImAhNoBoDy is offline Reference Formula and cell reference Windows 7 64bit Reference Formula and cell reference Office 2007
Novice
Reference Formula and cell reference
 
Join Date: Jan 2012
Posts: 17
ImAhNoBoDy is on a distinguished road
Default

I needed up using something similar to this:

https://www.extendoffice.com/documen...al-values.html

=TEXTJOIN(", ", TRUE, IF(COUNTIF(A2, "*"&$D$2:$D$7&"*"), $D$2:$D$7, ""))

The above is just a copy and paste from the site and not what I put in my spreadsheet. I'm putting it here in case I need reference it again.

I got the cell address, I just haven't put everything together. But I think I got what I needed. Thanks.
Reply With Quote
  #6  
Old 10-22-2024, 09:42 AM
ImAhNoBoDy ImAhNoBoDy is offline Reference Formula and cell reference Windows 11 Reference Formula and cell reference Office 2021
Novice
Reference Formula and cell reference
 
Join Date: Jan 2012
Posts: 17
ImAhNoBoDy is on a distinguished road
Default

So I've been at this for the last few days.

I've attached the same spreadsheet, but made some adjustments to the formula. I'm trying to make the formula as dynamic as possible.

So in cell E5, I was able to create an address array, but it's not searchable. In cell E6, I manually created the address array to see if the concept would work where a text matches one of the address arrays. It works, but I can't get a value from the searchable address when using the INDIRECT function. I think it's because the values spilled to the next cells.

Can anyone help with cell E5 and get the dynamic address array to be a valid array. I'm assuming the formula is evaluating it as a text and not as an array. Then in cell E6, can we get 1 result in the same cell and then use an INDIRECT function on it, so it can evaulate text to a value? Thanks.

In the end I'm trying to do a =SUM((previous workout weight)+(long formula that evaluates to a value dynamically))

Edit: Updated spreadsheet. I was able to figure out how to extract an address in E5:

Code:
=MID(FORMULATEXT(D5),SEARCH(TEXTSPLIT(TEXTJOIN(",",TRUE,ADDRESS(ROW(E2:I2),COLUMN(E2:I2))),","),FORMULATEXT(D5)),4)
Attached Files
File Type: xlsx Benching.xlsx (11.1 KB, 2 views)

Last edited by ImAhNoBoDy; 10-22-2024 at 11:40 PM.
Reply With Quote
  #7  
Old 10-30-2024, 08:41 PM
ImAhNoBoDy ImAhNoBoDy is offline Reference Formula and cell reference Windows 11 Reference Formula and cell reference Office 2021
Novice
Reference Formula and cell reference
 
Join Date: Jan 2012
Posts: 17
ImAhNoBoDy is on a distinguished road
Default

So the way I was thinking about things was incorrect. I think I was trying for something like this:

Code:
=SUM(D5+INDIRECT(ARRAYTOTEXT(FILTER(MID(FORMULATEXT(D5),SEARCH(TEXTSPLIT(TEXTJOIN(",",TRUE,ADDRESS(ROW(E2:I2),COLUMN(E2:I2))),","),FORMULATEXT(D5)),4),NOT(ISERROR(MID(FORMULATEXT(D5),SEARCH(TEXTSPLIT(TEXTJOIN(",",TRUE,ADDRESS(ROW(E2:I2),COLUMN(E2:I2))),","),FORMULATEXT(D5)),4)))))))
But the next column wouldn't be able to determine what the previous value was gonna be. I really didn't think this through logically. It would need to be script something in vba to get the results I really want.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reference Formula and cell reference Determining if an in-text table reference was created with Word's native cross reference feature scienceguy Excel Programming 2 10-25-2021 04:44 AM
Reference Formula and cell reference Entering a column value in a cell, to be used as part of a reference in a formula in another cell paulkaye Excel 4 02-26-2017 04:18 AM
Reference Formula and cell reference Formula for reference last non empty cell in row npn321 Excel 10 02-22-2017 11:42 PM
Reference Formula and cell reference Issue with a dynamic cell linking/reference formula raravind82 Excel 2 10-26-2016 04:16 AM
Reference Formula and cell reference Reference number and cross reference for equation numbers to match the thesis format wmac Word 1 05-14-2013 08:54 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:36 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft