Home

Help with Nested If-And formula for Gantt style project

%3CLINGO-SUB%20id%3D%22lingo-sub-881332%22%20slang%3D%22en-US%22%3ERE%3A%20Help%20with%20Nested%20If-And%20formula%20for%20Gantt%20style%20project%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-881332%22%20slang%3D%22en-US%22%3EOne%20more%20bit%20of%20info%2C%20I%20am%20using%20Excel%202013%20(Not%20on%20365).%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-881322%22%20slang%3D%22en-US%22%3EHelp%20with%20Nested%20If-And%20formula%20for%20Gantt%20style%20project%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-881322%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20create%20a%20formula%20that%20identifies%20a%20color%20(conditionally%20formatted)%20based%20off%20of%20a%20number%20assigned%20to%20a%20cell%20based%20on%20a%20date.%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESet%20Up%3A%26nbsp%3B%20The%20date%20rolls%20from%20today%20forward%20on%20the%20top%20row%20e.g.%20Sep%2C%20Oct%2C%20Nov%2C%20Dec%20etc.%26nbsp%3B%20These%20months%20are%20in%20their%20own%20columns.%26nbsp%3B%20The%20Start%20Date%2C%20End%20Date%2C%20and%20Percentages%20are%20typed%20in%20by%20the%20user.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20assigned%20a%202%2C3%2C4%2C5%20and%206%20to%20the%20colors%3A%20Amber(Orange)%2C%20Yellow%2C%20Light%20Blue%2C%20Light%20Green%20and%20Dark%20Green%20respectively.%26nbsp%3B%20This%20will%20pull%20the%20number%20to%20the%20cell%20so%20I%20can%20use%20it%20for%20conditional%20formatting.%26nbsp%3B%20This%20is%20not%20required%20I%20just%20did%20this%20for%20conditional%20formatting%20purposes.%26nbsp%3B%20If%20there%20is%20another%20easier%20way%20to%20do%20all%20of%20this%20I%20am%20game%20to%20try%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EResult%20Expected%20(See%20attached%20file%20for%20reference)%3A%26nbsp%3B%20When%20a%20person%20enters%20the%20start%20date%20it%20places%20a%20color%20into%20the%20associated%20month%20(today)%20under%20the%20column%20assigned%20to%20that%20month.%26nbsp%3B%20Think%20Gantt%20chart.%26nbsp%3B%20The%20color%20is%20a%20percentage%20range%20so%20for%20example%20if%20a%20person%20inputs%20100%25%20in%20the%20cell%2C%20the%20cell%20under%20the%20same%20row%20but%20under%20the%20correct%20date%20column%20turns%20Dark%20Green.%26nbsp%3B%20If%20they%20put%20any%20percentage%20between%200%20and%2026%25%20in%20the%20percentage%20column%2C%20it%20turns%20Amber%20Between%20the%20current%20date%20and%20the%20start%20date.%26nbsp%3B%20Also%2C%20the%20top%20date%20row%20with%20the%20rolling%20dates%20changes%20to%20the%20current%20month%20automatically%20based%20off%20of%20the%20Today()%20formula%20and%20all%20the%20other%20dates%20to%20the%20right%20of%20the%20first%20date%20automatically%20update.%26nbsp%3B%20I%20need%20the%20colored%20cell%20to%20follow%20those%20dates.%26nbsp%3B%20For%20example%2C%20when%20the%20date%20goes%20from%20Sep%20to%20Oct%2C%20the%20colored%20cell%20continues%20to%20follow%20Oct%20with%20the%20same%20color%20until%20the%20percentage%20is%20changed%20to%20indicate%20another%20color.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20the%20formula%20I%20have%20created%20so%20far%20that%20does%20not%20work%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(AND(E3%26gt%3B%3D0.01%2CE3%26lt%3B%3D0.25%2CMonth(C3)%3DMonth(G2)%2C%E2%80%9D2%E2%80%9D%2CIF(AND(E3%26gt%3B0.26%2CE3%26lt%3B%3D0.5%2CMonth(C3)%3DMonth(G2)%2C%E2%80%9D3%E2%80%9D%2CIF(AND(E3%26gt%3B%3D0.51%2CE3%26lt%3B%3D0.75%2CMonth(C3)%3DMonth(G2)%2C%E2%80%9D4%E2%80%9D%2CIF(AND(E3%26gt%3B%3D.76%2CE3%26lt%3B%3D0.99%2CMonth(C3)%3DMonth(G2)%2C%E2%80%9D5%E2%80%9D%2CIF(AND(E3%3D1%2CMonth(C3)%3DMonth(G2)%2C%E2%80%9D6%E2%80%9D%2C%E2%80%9D%E2%80%9D))))))))))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EE3%20is%20the%20first%20entry%20for%20percentages%3C%2FP%3E%3CP%3EC3%20is%20the%20start%20date%3C%2FP%3E%3CP%3EG2%20is%20the%20first%20cell%20under%20the%20rolling%20month%20columns%20(29SEP).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20for%20the%20end%20date%2C%20I%20would%20like%20for%20the%20cell%20to%20show%20maybe%20another%20color%20on%20that%20day%2C%20say%20black%2C%20then%20the%20following%20day%20show%20no%20color.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20let%20me%20know%20what%20you%20think!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%20for%20any%20assistance%20with%20this.%3C%2FP%3E%3CP%3EMike%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-881322%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
MikeOU812
New Contributor

I am trying to create a formula that identifies a color (conditionally formatted) based off of a number assigned to a cell based on a date.    

 

Set Up:  The date rolls from today forward on the top row e.g. Sep, Oct, Nov, Dec etc.  These months are in their own columns.  The Start Date, End Date, and Percentages are typed in by the user.

 

I assigned a 2,3,4,5 and 6 to the colors: Amber(Orange), Yellow, Light Blue, Light Green and Dark Green respectively.  This will pull the number to the cell so I can use it for conditional formatting.  This is not required I just did this for conditional formatting purposes.  If there is another easier way to do all of this I am game to try it.

 

Result Expected (See attached file for reference):  When a person enters the start date it places a color into the associated month (today) under the column assigned to that month.  Think Gantt chart.  The color is a percentage range so for example if a person inputs 100% in the cell, the cell under the same row but under the correct date column turns Dark Green.  If they put any percentage between 0 and 26% in the percentage column, it turns Amber Between the current date and the start date.  Also, the top date row with the rolling dates changes to the current month automatically based off of the Today() formula and all the other dates to the right of the first date automatically update.  I need the colored cell to follow those dates.  For example, when the date goes from Sep to Oct, the colored cell continues to follow Oct with the same color until the percentage is changed to indicate another color.  

 

Here is the formula I have created so far that does not work:

 

=IF(AND(E3>=0.01,E3<=0.25,Month(C3)=Month(G2),”2”,IF(AND(E3>0.26,E3<=0.5,Month(C3)=Month(G2),”3”,IF(AND(E3>=0.51,E3<=0.75,Month(C3)=Month(G2),”4”,IF(AND(E3>=.76,E3<=0.99,Month(C3)=Month(G2),”5”,IF(AND(E3=1,Month(C3)=Month(G2),”6”,””))))))))))

 

E3 is the first entry for percentages

C3 is the start date

G2 is the first cell under the rolling month columns (29SEP).

 

As for the end date, I would like for the cell to show maybe another color on that day, say black, then the following day show no color.

 

Please let me know what you think!

 

Thanks in advance for any assistance with this.

Mike

1 Reply
Highlighted
One more bit of info, I am using Excel 2013 (Not on 365).
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
30 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
9 Replies