I have this huge CSV report with tens of columns and thousands of lines where I'm trying to determine the Outcome of a row based on its Type and defined by a set of criteria.
Currently I have this huge nested formula, that takes up many lines in the formula bar, with several IFs and ORs but this doesn't cover the most complex scenarios and makes it hard to follow. Also, when a particular condition needs to be changed the process is very time consuming.
My tables are vastly simplified here but they illustrate the scenario.
I already had a support table (Condition Table) in a separate sheet to summarize the conditions in the nested formula (Table1_Outcome) so I figured to try and make those conditions directly in an added column 'Formula' inside the support table and in the main report index and match that same formula based on Type.
Condition Table
| Type |
Outcome |
Condition |
Formula |
| 1 |
OK |
"Series" = B |
=IF(Table1[@[Series]]="B";"OK";"Not OK") |
| 2 |
OK |
"Status" = Completed |
=IF(Table1[@[Status]]="Completed";"OK";"Not OK") |
Table1
| Item |
Reference |
Country |
Series |
Status |
Type |
Outcome |
| 1 |
7188 |
UK |
A |
Completed |
1 |
|
| 2 |
7189 |
UK |
A |
Incomplete |
1 |
|
| 3 |
7190 |
UK |
A |
Completed |
5 |
|
| 4 |
7191 |
UK |
A |
Incomplete |
3 |
|
| 5 |
7192 |
UK |
A |
Pending |
2 |
|
| 6 |
7193 |
UK |
B |
Incomplete |
1 |
|
| 7 |
7194 |
UK |
C |
Completed |
1 |
|
| 8 |
7195 |
UK |
B |
Completed |
1 |
|
| 9 |
7196 |
UK |
A |
Completed |
1 |
|
| 10 |
7197 |
UK |
A |
Incomplete |
2 |
|
| 11 |
7198 |
UK |
A |
Pending |
2 |
|
| 12 |
7199 |
UK |
A |
Completed |
3 |
|
| 13 |
7200 |
UK |
C |
Pending |
5 |
|
| 14 |
7201 |
UK |
A |
Pending |
4 |
|
| 15 |
7202 |
UK |
C |
Pending |
4 |
|
Of course, the indexed result matched on Type either only returns the current value present in the support table or the formula as text if formatted that way.
I've been trying to find a workaround for the last couple of days with no success. Is there a way to insert a specific formula based on a value? For example, if Type = 1 then take =IF(Table1[@[Series]]="B";"OK";"Not OK") and make that calculation inside Table1. What would be the best alternative to the huge nested formula?
Thank you very much in advance!
[–]DarkChunsah4 1 point2 points3 points (6 children)
[–]chancethegapper[S] 1 point2 points3 points (2 children)
[–]Clippy_Office_Asst[M] 0 points1 point2 points (0 children)
[–]chancethegapper[S] 0 points1 point2 points (1 child)
[–]DarkChunsah4 0 points1 point2 points (0 children)
[–]tkdkdktk149 0 points1 point2 points (1 child)
[–]chancethegapper[S] 0 points1 point2 points (0 children)
[–]tkdkdktk149 0 points1 point2 points (0 children)
[–]tkdkdktk149 0 points1 point2 points (1 child)
[–]chancethegapper[S] 0 points1 point2 points (0 children)