Change value of cells in a range based on value of another cell

mkrass

New Member
Joined
Mar 12, 2024
Messages
15
Office Version
  1. 365
  2. 2021
  3. 2019
Platform
  1. Windows
I am working in a labor tracking sheet. I need to allow for daily approval of hours, i.e., per column via G13 ..... I want to add a capability that allows someone to approve the entire week as well, i.e., G11 = "A". I am currently using the values from row13 to calculate "approved" hours in column E. Is there a way once the value of G11 (which represents a week) has been changed to "A" to have the values of G13:M13 changed to "A"? Which I am hoping would then run the existing Conditional formatting rule? I tried using IF(G11="A", "A", "") in a conditional formatting rule, but that doesn't seem to do the trick.

Any help would be appreciated.

Approvals Test.xlsx
ABCDEFGHIJKLM
1Today's Date3/26/2024
2Labor Threshold10.00%
3Revenue Threshold60.00%
4Credit Expiry1/5/2024
5
6Key
7PTO/Holiday
8Insert data
9Insert data (weekend)Note: Adjust Group or hide/unhide row/column, as needed DO NOT DELETE ROWs or COLUMNs
10Approved - AQ1FY24-W10
11Planned - PP
121/1/20241/2/20241/3/20241/4/20241/5/20241/6/20241/7/2024
13RoleResource NameCountryBudgeted HoursBilled HoursAvailable HoursPPPPPPP
14Workstream 12400-162
15PrincipleBobUS600182222222
16Sr Con - NSXSallyUS800622222222
17Sr PM HelenUS1000822222222
18<Insert Role Name><Insert Resource Name><Country>00-182222222
19<Insert Role Name><Insert Resource Name><Country>00-182222222
20<Insert Role Name><Insert Resource Name><Country>00-182222222
21<Insert Role Name><Insert Resource Name><Country>00-182222222
22<Insert Role Name><Insert Resource Name><Country>00-182222222
23<Insert Role Name><Insert Resource Name><Country>00-182222222
24<Insert Role Name><Insert Resource Name><Country>00-182222222
25<Insert Role Name><Insert Resource Name><Country>00-182222222
26<Insert Role Name><Insert Resource Name><Country>00-182222222
27<Insert Role Name><Insert Resource Name><Country>00-182222222
28<Insert Role Name><Insert Resource Name><Country>00-182222222
29<Insert Role Name><Insert Resource Name><Country>00-182222222
30<Insert Role Name><Insert Resource Name><Country>00-182222222
31<Insert Role Name><Insert Resource Name><Country>00-182222222
32<Insert Role Name><Insert Resource Name><Country>00-182222222
33<Insert Role Name><Insert Resource Name><Country>00-182222222
34<Insert Role Name><Insert Resource Name><Country>00-182222222
35<Insert Role Name><Insert Resource Name><Country>00-182222222
Sheet1
Cell Formulas
RangeFormula
B1B1=TODAY()
A14,A15:C35A14='[DRAFT - TM Project Forecast - MCK Working File.xlsx]Project Setup'!B11
D14:F14D14=SUM(D15:D35)
E15:E35E15=SUMIF($13:$13,"A",15:15)
F15:F35F15=D15-SUM(G15:AJ15,AL15:BN15,BP15:CT15,CW15:DZ15,EB15:FF15,FH15:GK15,GM15:HQ15,HS15:IW15,IY15:KB15,KD15:LH15,LJ15:MM15,MO15:NS15,NU15:OY15,PA15:QB15,QD15:RH15,RJ15:SM15,SO15:TS15,TU15:UX15,UZ15:WD15,WF15:XJ15,XL15:YO15,YQ15:ZU15,ZW15:AAZ15,ABB15:ACF15,ACH15:ADL15,ADN15:ADN15)
D17:D35D17='[DRAFT - TM Project Forecast - MCK Working File.xlsx]Project Setup'!F14
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G15:M57Expression=IF($G$11="A", "A", "")textNO
G17:BP17Expression=AND(ISNUMBER(G$12),SUMIFS($G17:G17,$G$12:G$12,"<>")>=$D$17*$B$2)textNO
G16:BP16Expression=AND(ISNUMBER(G$12),SUMIFS($G16:G16,$G$12:G$12,"<>")>=$D$16*$B$2)textNO
G15:BR15Expression=AND(ISNUMBER(G$12),SUMIFS($G15:G15,$G$12:G$12,"<>")>=$D$15*$B$2)textNO
M15:M35,M37:M57Expression=COUNTIF($M$13, "A")textNO
L15:L35,L37:L57Expression=COUNTIF($L$13, "A")textNO
K15:K35,K37:K57Expression=COUNTIF($K$13, "A")textNO
J15:J35,J37:J57Expression=COUNTIF($J$13, "A")textNO
I15:I35,I37:I57Expression=COUNTIF($I$13, "A")textNO
H15:H35,H37:H57Expression=COUNTIF($H$13, "A")textNO
G15:G35,G37:G57Expression=COUNTIF($G$13, "A")textNO
G13:BR13Cell Value="A"textNO
G13:BR13Cell Value="P"textNO
G12:AK57Expression=G$12=$B$4textNO
G11,N11,U11,AB11,AI11,AQ11,AX11,BE11,BL11Cell Value="A"textNO
G11,N11,U11,AB11,AI11,AQ11,AX11,BE11,BL11Cell Value="P"textNO
F15:F35Cell Value<0textNO
F14:F57Cell Value<0textNO
Cells with Data Validation
CellAllowCriteria
A1:F57ListA,P
G1:T10ListA,P
G11:M11ListA, P
G12:T12ListA,P
G13:M13ListA, P
G14:T57ListA,P
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
=$G$11
in G13 - copied to M13
then what is in the merged cell in row 11
will be copied into those cells

Book6
ABCDEFGHIJKLM
9Insert data (weekend)Note: Adjust Group or hide/unhide row/column, as needed DO NOT DELETE ROWs or COLUMNs
10Approved - AQ1FY24-W10
11Planned - PA
1245292452934529445295452964529745298
13RoleResource NameCountryBudgeted HoursBilled HoursAvailable HoursAAAAAAA
14#REF!#REF!294#REF!
15#REF!#REF!#REF!6014462222222
16#REF!#REF!#REF!8014662222222
Sheet1
Cell Formulas
RangeFormula
G13:M13G13=$G$11
A14,A15:C16A14='[DRAFT - TM Project Forecast - MCK Working File.xlsx]Project Setup'!B11
D14:F14D14=SUM(D15:D35)
E15:E16E15=SUMIF($13:$13,"A",15:15)
F15:F16F15=D15-SUM(G15:AJ15,AL15:BN15,BP15:CT15,CW15:DZ15,EB15:FF15,FH15:GK15,GM15:HQ15,HS15:IW15,IY15:KB15,KD15:LH15,LJ15:MM15,MO15:NS15,NU15:OY15,PA15:QB15,QD15:RH15,RJ15:SM15,SO15:TS15,TU15:UX15,UZ15:WD15,WF15:XJ15,XL15:YO15,YQ15:ZU15,ZW15:AAZ15,ABB15:ACF15,ACH15:ADL15,ADN15:ADN15)


what do you want to happen to conditional formatting

select G13 to M13
and then use a formula

=G13 = "A" and format colour

new rule
=G13 = "P" and format colour

for whatever colours you want
 
Upvote 0
Etaf, thank you. Perhaps I didn't articulate myself well.
The use case is that a user dynamically selects "A" from the drop down in G11, and then the values of G13:M13 are dynamically updated to "A", so that the existing conditional format rules are applied.

Are you saying that the conditional format rule that I should apply is "=$G$11"?

I'm asking purely to understand better. ;-)
 
Upvote 0
The use case is that a user dynamically selects "A" from the drop down in G11,
G11 did not have a dropdown
Not that would make any difference the formula still applies

and then the values of G13:M13 are dynamically updated to "A",
again as i posted , put a formula in G13
=$G$11 and copy to M13

now what ever is in G11 will be in G13:M13

so that the existing conditional format rules are applied.
so those should apply to G13 to M13
as you have

G13:BR13Cell Value="A"textNO
G13:BR13Cell Value="P"

So G13 to BR13 will update , if the cell contains a A or a P by the look ofit

not sure how this would work in conditional formatting
=IF($G$11="A", "A", "")
as you need TRUE and FALSE
and its allied to G15:M57
so wont affect row 13 anyway

and various counts

so not sure how conditional formatting is working as the selection varies

can you expand a little more perhaps - as to what is NOT working when you use the formula i posted
 
Upvote 0
etaf - thank you. One clarification.

The values of G11 and the values of G13:M13 are asynchronous. The value of G13, G14, and G15 may be "A", while G11 is "P", but, when G11 is changed to "A", then the values of all the cells in G13:M13 should be changed to "A". I believe your suggestion won't allow the values of G13:M13 to be independent of the value of G11 UNTIL the value of G11 is updated to "A". Does that make sense? I may "approve" time for Monday, Tuesday, and Wednesday, because it's the end of a calendar month, and then wait to approve the rest of the week via the G11 merged cell - being changed to "A"
 
Upvote 0
no it wont do that
not sure if it can be done with a forumula , i have seen somethign recently - BUT i will try and find it if i can
or VBA - which i do offer solutions for
 
Upvote 0
found the thread i thought did manage to do somethign similar - BUT it wont work here ......
so i dont know a solution for you , other than VBA , but other members may read and have a solution
i'll have a think
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,179
Members
452,615
Latest member
bogeys2birdies

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