Help pls

SmithW1

New Member
Joined
Jul 11, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Im needing to make an excel sheet to record employee discount spending. Ive created a very basic sheet, but need help with making it work.

- When an employee goes over $200 I need their specific rows to highlight or otherwise indicate so. For example in the sheet below Will has a total balance of $207, in this case I would need his rows to highlight or indicate that he has gone over $200.
1689118336591.png


Thanks.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
(a) please don't post a photo. Use XL2BB to illustrate your data so that anyone helping you doesn't have to recreate it.
(b) how did you get $207 for Will when it seems 80+25+20 = 125 or 80+(2)(25)+20 = 150 ??
 
Upvote 0
Maybe you want something like this?

Code:
Sub Over200()
Dim lr, i, t As Long
lr = Cells(Rows.Count, "B").End(xlUp).Row
Range("A2:D" & lr).Interior.ColorIndex = xlNone
For i = 2 To lr
 t = WorksheetFunction.SumIf(Range("B2:B" & lr), Cells(i, "B"), Range("D2:D" & lr))
 If t >= 200 Then
 Cells(i, "B").Interior.Color = vbYellow
 Cells(i, "D").Interior.Color = vbYellow
 End If
Next i
End Sub
 
Upvote 0
(a) please don't post a photo. Use XL2BB to illustrate your data so that anyone helping you doesn't have to recreate it.
(b) how did you get $207 for Will when it seems 80+25+20 = 125 or 80+(2)(25)+20 = 150 ??
My bad I had taken the screen shot before I had updated the values.

Book1
ABCDE
1DateTeam member nameItems Total amount (Before discount)Authorising Manager
23/06/2023jacobsocks x111matt
35/06/2023willboots87jackson
48/06/2023sampants x115matt
511/06/2023williamunderwear pack x112dan
615/06/2023willpants x2 65dan
716/06/2023jakeshirt x1 & pants x127dan
820/06/2023willpants x155jackson
923/06/2023williamsocks x3 & shorts x140matt
1028/06/2023jakepants x245dan
Sheet1
 
Upvote 0
You could try this conditional formatting

23 07 12.xlsm
ABCDE
1DateTeam member nameItems Total amount (Before discount)Authorising Manager
23/06/2023jacobsocks x111matt
35/06/2023willboots87jackson
48/06/2023sampants x115matt
511/06/2023williamunderwear pack x112dan
615/06/2023willpants x2 65dan
716/06/2023jakeshirt x1 & pants x127dan
820/06/2023willpants x155jackson
923/06/2023williamsocks x3 & shorts x140matt
1028/06/2023jakepants x245dan
CF > 200
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:E10Expression=SUMIFS($D$2:$D$10,$B$2:$B$10,$B2)>200textNO
 
Upvote 0
Solution
You could try this conditional formatting

23 07 12.xlsm
ABCDE
1DateTeam member nameItems Total amount (Before discount)Authorising Manager
23/06/2023jacobsocks x111matt
35/06/2023willboots87jackson
48/06/2023sampants x115matt
511/06/2023williamunderwear pack x112dan
615/06/2023willpants x2 65dan
716/06/2023jakeshirt x1 & pants x127dan
820/06/2023willpants x155jackson
923/06/2023williamsocks x3 & shorts x140matt
1028/06/2023jakepants x245dan
CF > 200
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:E10Expression=SUMIFS($D$2:$D$10,$B$2:$B$10,$B2)>200textNO
worked perfectly, thank you.
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,331
Messages
6,124,312
Members
449,152
Latest member
PressEscape

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