Formula contains and ERROR???

L

Legacy 259187

Guest
Hello, I am trying to displace 3 different results, 0,1 or "", based on 4 arguments. The formula I am trying to do this with is =IF(AND(B$2>=Data!$L2,B$2<=Data!$W2),1,"",IF(AND (B$2>=Data!$M2,B$2<=Data!$P2),0,"")). Excel is telling me I an error. I must be missing something. This is for a gantt chart that I want to display results in a way that the chart tool cant help me with so I am having to try to build this from scratch. Looks like I have hit a wall. any help to point out the error here would be most appreciated.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Gantt Chart
T

<tbody>
</tbody><colgroup><col></colgroup>
WTFSSMTWTF
Dateline2627282930310102030405
CA01-07 Wall Sub-Module - Summer 2

<tbody>
</tbody><colgroup><col style="text-align: center;"></colgroup>
""""111100000
FAB.100 Sub Assembly 100

<tbody>
</tbody><colgroup><col style="text-align: center;"></colgroup>
""""111000""""""
S2-01-07 FAB.100

<tbody>
</tbody><colgroup><col style="text-align: center;"></colgroup>
""""1112222""""
Final Final Assembly

<tbody>
</tbody><colgroup><col style="text-align: center;"></colgroup>
""""""""""100000
S2-01-07 Final

<tbody>
</tbody><colgroup><col style="text-align: center;"></colgroup>
""""""100000""""
CA01-07 Wall Sub-Module - Vogtle 3

<tbody>
</tbody><colgroup><col style="text-align: center;"></colgroup>
11100000""""""
FAB.100 Sub Assembly 100

<tbody>
</tbody><colgroup><col style="text-align: center;"></colgroup>
111100000""""
V3-01-07 FAB.100

<tbody>
</tbody><colgroup><col></colgroup>
""1111000""""""

<tbody>
</tbody>
 
Upvote 0
The 1 stands for progression, 2 for actual, 0 for baseline and "" are to be populated as blanks. all of which will be conditionally formatted with colors of my choosing. the items orders in the first column are subject to change positions and I need the formula to correctly follow and place the appropriate 0,1,2,"" in the correct cells when data is updated at the source. This is why I need on standing formula to paste throughout the grid.
 
Upvote 0
Does this work for you?

=IF(OR(LEFT(A1,2)="S2",LEFT(A1,2)="V3"),IF(AND(C$2>=Data!$M3,C$2<=Data!$X3),1,IF(AND(C$2>=Data!$X3,C$2<=Data!$P3),0,"")),IF(OR(ISNUMBER(FIND("Assembly",A1)),ISNUMBER(FIND("CA0",A1))),IF(AND(C$2>=Data!$V4,C$2<=Data!$W4),1,IF(AND(C$2>=Data!$W4,C$2<=Data!$O4),2,"")),""))
 
Upvote 0
After pasting the formula across the chart with a few mods to indicate the correct cells, I am getting all blanks. The 0,1,2's are not populating at all anymore. On a positive note, I am not getting any errors. Everything looks like it should as far as the original formulas are concerned. With no errors I do not see where the problem could be.
 
Upvote 0
Sir, you are a genius. I had to install some $'s to lock down the column so nothing changed across the grid and toss a few spaces into the key words. eveything is A+ now. Thank you for all your help. My report is now ready to be presented to production. Here is what I had to change up if you are curious... =IF(OR(LEFT($B4,6)=" S2",LEFT($B4,6)=" V3"),IF(AND(C$2>=Data!$V2,C$2<=Data!$W2),1,IF(AND(C$2>=Data!$W2,C$2<=Data!$O2),2,"")),IF(OR(ISNUMBER(FIND("Assembly",$B4)),ISNUMBER(FIND("CA0",$B4))),IF(AND(C$2>=Data!$M2,C$2<=Data!$X2),1,IF(AND(C$2>=Data!$X2,C$2<=Data!$P2),0,"")),""))
 
Last edited by a moderator:
Upvote 0
The Data source exported the "S2"/"V3" with 4 spaces in front and my chart actually begins at B4. A:A is used to calculate the delta to tell up front how many day behind or ahead of schedule each item is. B1-B3 are used to base the delta from todays date and place the Data dateline in the correct location on the chart plus header labeling
 
Upvote 0

Forum statistics

Threads
1,215,148
Messages
6,123,309
Members
449,095
Latest member
Chestertim

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