Value or formula in a cell dependent on another cell

muhleebbin

Active Member
Joined
Sep 30, 2017
Messages
252
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
  5. 2010
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
Is it possible to have a value or a formula in H3:H54 that's dependent on J1? Basically trying to build a new rate sheet for the upcoming year and cells G3:G54 have the previous years rates. So depending on how a user would like to use this sheet, they could either fill in a 5% in J1 and H3:H54 would show a 5% increase from the previous year. However some users will probably just populate the individual rates or want to override the calculation with a more palatable amount.

Below is a test sample but I'd like to either be able to override the values of H (like H14) and it still calculate appropriately if J1 is filled in again.

Test.xlsx
ABCDEFGHIJ
1Test5%
2RoomDenOccupancyHelper202120222023 Rates
31 Bedroom100YSingleY|Single9001,0001,0505.00%
4101YDouble AY|Double A8009009455.00%
5102YDouble BY|Double B8009009455.00%
6103Single  
7104Double A  
8105Double B  
9106Single  
10107Double A  
11108Double B  
12109YSingleY|Single9001,0001,0505.00%
13110NDouble AN|Double A8009009455.00%
14111NDouble BN|Double B8009009758.33%
15112Single  
16113Double A  
17114Double B  
18115NSingleN|Single9001,0001,0505.00%
19116NDouble AN|Double A8009009455.00%
20117NDouble BN|Double B8009009455.00%
21118Single  
22119Double A  
23120Double B  
24121Single  
25122Double A  
26123Double B  
27124Single  
28125Double A  
29126Double B  
30127Single  
31128Double A  
32129Double B  
33130Single  
34131Double A  
35132Double B  
362 Bedroom200YSingleY|Single1,2001,5001,5755.00%
37201YDouble AY|Double A1,1001,3001,3655.00%
38202YDouble BY|Double B1,1001,3001,3655.00%
39203Single  
40204Double A  
41205Double B  
42206Single  
43207Double A  
44208Double B  
45209Single  
46210Double A  
47211Double B  
48212Single  
49213Double A  
50214Double B  
513 Bedroom300Single  
52301Double A  
53302Double B  
54303  
Sheet1
Cell Formulas
RangeFormula
F2F2=G2-1
H2H2=CONCATENATE(G2+1," Rates")
H3:H5,H37:H38,H18:H20,H12:H13H3=G3+(G3*$J$1)
H36H36=G36+(G36*J1)
E3:E54E3=IF(OR(C3="",D3=""),"",CONCATENATE(C3,"|",D3))
J3:J54J3=IFERROR((H3-G3)/G3,"")
 

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
So when you enter a value you want it to automatically calculate the total based on the value in J1? So when you enter 975 into H14 you want the value of 975 * (1+J1) = 1,023.75 to be put into that cell?

Is the percent value always in J1?

The only way I can think of to do this is to use Excel's Change Event. It is triggered when there is a change to the worksheet, like entering a data value (for example, entering 975 into H14). It would determine whether the value entered is in column H. If so it would multiply the value entered by the value in J1 -- value 975 * (1+$J$1) -- then put the result (1,023.75) into the cell.
 
Upvote 0
So when you enter a value you want it to automatically calculate the total based on the value in J1? So when you enter 975 into H14 you want the value of 975 * (1+J1) = 1,023.75 to be put into that cell?

Is the percent value always in J1?

The only way I can think of to do this is to use Excel's Change Event. It is triggered when there is a change to the worksheet, like entering a data value (for example, entering 975 into H14). It would determine whether the value entered is in column H. If so it would multiply the value entered by the value in J1 -- value 975 * (1+$J$1) -- then put the result (1,023.75) into the cell.

Not exactly. I suppose it is better explained with users. User 1 may just opt to put in a % in J1 whereas user 2 may want to put in numbers like the 975. The rest of column J will tell them the percentage change so user 2 may just not care if it's a uniform change or not. But if user 2 got a hold of it first and put in a set value for column H, if user 1 subsequently got a hold of the sheet and they put in a value for J1 then the cell that was overridden would no longer calculate.

Your suggestion of the change event though is interesting. Can I have it where if J1 is a value then fill cells J3:J54 with the appropriate formula but if it is blank then it clears out any formulas in the same cells?

Thank you very much for your question and suggestion!
 
Upvote 0
I'm kinda confused about what is needed. The value of 975 could be multiplied by J1 or?

if J1 is a value then fill cells J3:J54 with the appropriate formula but if it is blank then it clears out any formulas in the same cells?

Huh? So if someone clears the value in J1 the values in J3:J54 contains what? What is the "appropriate" formula.

If J1 is cleared then if user enters 975 into H14 what happens?
 
Upvote 0
If J1 has anything in there H3:H54 contains the formula =G3+(G3*$J$1) respectively. If J1 gets cleared then the formula's would clear out and the user can input static values.

I can also see someone putting in a value for J1 and then overriding the number because they don't think it's enough or too much. If that happens and then they put in a value for J1, I want the H cell that was overridden to again calculate =G3+(G3*$J$1) respectively to its row.
 
Upvote 0
I'm kinda confused about what is needed. The value of 975 could be multiplied by J1 or?



Huh? So if someone clears the value in J1 the values in J3:J54 contains what? What is the "appropriate" formula.

If J1 is cleared then if user enters 975 into H14 what happens?
"if J1 is a value then fill cells J3:J54 with the appropriate formula" this line should have read 'if J1 is a value then fill cells H3:H54 with the appropriate formula'

J3:J54 is calculating the percentage change for the user

Sorry for the confusion
 
Upvote 0
OK, what is the formula in J14 if J1 is empty? What is the formula in J14 if J1 is empty.
 
Upvote 0
J column is just a percentage change that calculates the increase or decrease in rate from the previous year. =IFERROR((H3-G3)/G3,"") in this case =IFERROR((H14-G14)/G14,"")
 
Upvote 0
H column is the one that really has the variable, whether it's a static value or a calculated value and that's dependent on if J1 has a value or not.
 
Upvote 0
OK so what is the appropriate formula? Do you mean like in cell H3 the formula is G3+(G3*$J$1). Otherwise H3:H54 are empty or what?
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,854
Members
449,096
Latest member
Erald

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