Find Differences in Two Column Sets and Report Result

jski21

Board Regular
Joined
Jan 2, 2019
Messages
155
Office Version
  1. 2016
Platform
  1. Windows
Good day Mr. Excel Team,

I'm trying to put together a formula that would look at for a difference between two cells and if there is one, the result would be "Dept. A: #.##" If there is no difference the result would be blank. Here's a snapshot:


NDA WARD REPORT.xlsm
BCDEFGHIJKLMNOPQ
3
4Dept.2022 - YR 482021 - YR 472020 - YR 462019 - YR 452018 - YR 442017 - YR 432016 - YR 422022 - YR 482021 - YR 472020 - YR 462019 - YR 452018 - YR 442017 - YR 432016 - YR 42
5Dept. A45,589.007,336.3834,233.574,771.5531,421.966,172.41-45,589.007,336.3834,233.574,771.5532,935.236,172.41
NDA Summary (2)
Cell Formulas
RangeFormula
F5F5=1053.84+33179.73
K5K5=INDEX('Grant Balances'!Z:Z,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0))
L5L5=INDEX('Grant Balances'!X:X,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0))
M5M5=INDEX('Grant Balances'!W:W,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0))
N5N5=INDEX('Grant Balances'!V:V,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0))
O5O5=INDEX('Grant Balances'!U:U,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0))
P5P5=INDEX('Grant Balances'!T:T,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0))
Q5Q5=INDEX('Grant Balances'!S:S,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
I5Cell Value<>Q5textNO
H5Cell Value<>P5textNO
G5Cell Value<>O5textNO
F5Cell Value<>N5textNO
E5Cell Value<>M5textNO
D5Cell Value<>L5textNO
Q5Cell Value<>I5textNO
P5Cell Value<>H5textNO
O5Cell Value<>G5textNO
N5Cell Value<>F5textNO
M5Cell Value<>E5textNO
C5Cell Value<>K5textNO
K5:K21Cell Value<>C5textNO
L5,N22:Q22Cell Value<>D5textNO
J5:J21Cell Value="Error"textNO


The formula I have written which is in another cell is:

=IF(C5=K5,"","Dept. A: "&TEXT(C5-K5,"#,##0.00 ;[Red](#,##0.00);- ")),IF(D5=L5,"","Dept. A: "&TEXT(D5-L5,"#,##0.00 ;[Red](#,##0.00);- ")),IF(E5=M5,"","Dept. A: "&TEXT(E5-M5,"#,##0.00 ;[Red](#,##0.00);- ")),IF(F5=N5,"","Dept. A: "&TEXT(F5-N5,"#,##0.00 ;[Red](#,##0.00);- ")),IF(G5=O5,"","Dept. A: "&TEXT(G5-O5,"#,##0.00 ;[Red](#,##0.00);- ")),IF(H5=P5,"","Dept. A: "&TEXT(H5-P5,"#,##0.00 ;[Red](#,##0.00);- ")),IF(I5=Q5,"","Dept. A: "&TEXT(I5-Q5,"#,##0.00 ;[Red](#,##0.00);- "))

Currently I get a #VALUE! error. Probably by trying to format the result. Might there be a better way? Is there a method perhaps to aggregate differences (if any) and have them appear as one result? For example, if one cell has a difference of 5 and another a difference of 10, the result would read: "Dept. A: 15.00.

Tricky. At least for me.

Thanks in advance for the review and assistance.


jski
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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