jski21
Board Regular
- Joined
- Jan 2, 2019
- Messages
- 155
- Office Version
- 2016
- Platform
- 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:
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
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 | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | |||
3 | ||||||||||||||||||
4 | Dept. | 2022 - YR 48 | 2021 - YR 47 | 2020 - YR 46 | 2019 - YR 45 | 2018 - YR 44 | 2017 - YR 43 | 2016 - YR 42 | 2022 - YR 48 | 2021 - YR 47 | 2020 - YR 46 | 2019 - YR 45 | 2018 - YR 44 | 2017 - YR 43 | 2016 - YR 42 | |||
5 | Dept. A | 45,589.00 | 7,336.38 | 34,233.57 | 4,771.55 | 31,421.96 | 6,172.41 | - | 45,589.00 | 7,336.38 | 34,233.57 | 4,771.55 | 32,935.23 | 6,172.41 | ||||
NDA Summary (2) |
Cell Formulas | ||
---|---|---|
Range | Formula | |
F5 | F5 | =1053.84+33179.73 |
K5 | K5 | =INDEX('Grant Balances'!Z:Z,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0)) |
L5 | L5 | =INDEX('Grant Balances'!X:X,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0)) |
M5 | M5 | =INDEX('Grant Balances'!W:W,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0)) |
N5 | N5 | =INDEX('Grant Balances'!V:V,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0)) |
O5 | O5 | =INDEX('Grant Balances'!U:U,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0)) |
P5 | P5 | =INDEX('Grant Balances'!T:T,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0)) |
Q5 | Q5 | =INDEX('Grant Balances'!S:S,MATCH("Ward 01 NDA",'Grant Balances'!Q:Q,0)) |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
I5 | Cell Value | <>Q5 | text | NO |
H5 | Cell Value | <>P5 | text | NO |
G5 | Cell Value | <>O5 | text | NO |
F5 | Cell Value | <>N5 | text | NO |
E5 | Cell Value | <>M5 | text | NO |
D5 | Cell Value | <>L5 | text | NO |
Q5 | Cell Value | <>I5 | text | NO |
P5 | Cell Value | <>H5 | text | NO |
O5 | Cell Value | <>G5 | text | NO |
N5 | Cell Value | <>F5 | text | NO |
M5 | Cell Value | <>E5 | text | NO |
C5 | Cell Value | <>K5 | text | NO |
K5:K21 | Cell Value | <>C5 | text | NO |
L5,N22:Q22 | Cell Value | <>D5 | text | NO |
J5:J21 | Cell Value | ="Error" | text | NO |
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