Conditional Formatting of VLOOKUP, Newbie in need of assistance.

BruceW123

New Member
Joined
Aug 8, 2023
Messages
11
Office Version
  1. 365
Platform
  1. MacOS
Hi all,

New to the forum. I am a treasurer who needs to track who owes money. As money comes in I fill in names in a speadsheet weekly, which calculates whether someone has paid their weekly fee, or owes money.
I have attached a photo of my excel sheet. I have a VLOOKUP with a column which calculates someone's overall debt. What i would, is a way to conditionally format so that said person's name in the weekly column changes colour to red if they fall below 0 in the bottom right corner where the VLOOKUP table is. Can someone help? Thanks in advance.
 

Attachments

  • Screenshot 2023-08-08 at 4.42.01 PM.png
    Screenshot 2023-08-08 at 4.42.01 PM.png
    145.6 KB · Views: 13
try
assuming the data is in Sheet1
use this and copy down
=SUM(IF(Sheet1!$B$2:$J$6=A2,Sheet1!$C$2:$K$6,0))

Book2
ABC
1NameChargeBalance
2Tom40-70
3Nick405
4Harry40-30
5Darryl400
6Ben3010
Sheet2
Cell Formulas
RangeFormula
C2:C6C2=SUM(IF(Sheet1!$B$2:$J$6=A2,Sheet1!$C$2:$K$6,0))
 
Upvote 0

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
try
assuming the data is in Sheet1
use this and copy down
=SUM(IF(Sheet1!$B$2:$J$6=A2,Sheet1!$C$2:$K$6,0))

Book2
ABC
1NameChargeBalance
2Tom40-70
3Nick405
4Harry40-30
5Darryl400
6Ben3010
Sheet2
Cell Formulas
RangeFormula
C2:C6C2=SUM(IF(Sheet1!$B$2:$J$6=A2,Sheet1!$C$2:$K$6,0))
I've done this, i'd done it initially, but i didnt know how to do the conditional formatting we did in the first part when the table was in sheet 2. When i remove the table from sheet 1, all the coloured formatting disappears. When i try to apply your formula but change it, it doesnt work. Do you have a conditional format sequence for when the table is in sheet 2?
 
Upvote 0
ok, sorry miss understood that
so you need to use

but refer to the new sheet reference
=COUNTIFS(sheet2!$A$2:$A$16,B3,sheet2!$C$2:$C$6,"<"&0) as a conditional formatting rule
 
Upvote 0
hi,

Thank you for all your help. I set eveything up, and while it works, it seems to completely break down when i remove names or edit columns. Think it has something to do with the look up from the table. It's too delicate for me to share with other people. Thank you for your help though.

You mentioned that were better ways to set up a running balance. If you have time, could you show me a small example that i could copy and expand. What i need is to be able to add the amounts in every week but also be able to visibly see on the first sheet whether someone is in debt, hence the colours. If you know of a better way, please do let me know. Thanks again for spending the time to show me these changes.
 
Upvote 0
Ok , it more to do with layout i think , but that will depend on how you want to setout the sheet
as you only showed 3 weeks

how many weeks do you go for ??
how many names may appear

so on the summary we are using

=COUNTIFS(sheet2!$A$2:$A$16,B3,sheet2!$C$2:$C$6,"<"&0)
now if more people are added the range is not big enough

how many people total are there likely to be - lets say 100 then change the range to include all possible names

=COUNTIFS(sheet2!$A$2:$A$100,B3,sheet2!$C$2:$C$100,"<"&0)

you could maybe enter names all in 1 column and dates

as you are using version 365 , you can pull across to sheet2 a set of unique names and then use that as a summary

there a few ways , but you cannot share the real data , even if desensitised at all ?

this sort of thing, summary could be on a different sheet

but i dont know enough about how you collect and record the money

Book2
ABCDEFGHIJK
1amount dueamout paidbalancveUnique names
2bob1/1/23week140400bob0
3john1/1/23week14010-30john-60
4jill1/1/23week14020-20jill-50
5fred1/1/23week140400fred-40
6susan1/1/23week140400susan0
7christine1/1/23week140-40christine-40
8harry1/1/23week140400harry0
9bob1/7/23week240400 
10john1/7/23week24010-30 
11jill1/7/23week24010-30 
12fred1/7/23week240-40 
Sheet3
Cell Formulas
RangeFormula
J2:J8J2=UNIQUE(FILTER(A:A,A:A<>""))
F2:F12F2=E2-D2
K2:K12K2=IF(J2="","",SUMIFS($E$2:$E$100,$A$2:$A$100,J2)-SUMIFS($D$2:$D$100,$A$2:$A$100,J2))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,310
Members
452,634
Latest member
cpostell

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