Excel Formulas with multiple functions

Copper Contributor

Hi there... I'm trying to use something like this formula, but I keep getting an error....

 

=IF((I18<1),AND(O$14>=$J18,O$14<=$K18),1)OR((I18>2),AND(O$14>=$J18,O$14<=$K18),2)

 

I know this portion is correct and working and providing a value of 1

=IF(AND(O$14>=$J18,O$14<=$K18),1"")

 

I'd like to add this to it (I18>1) and get a value of 2 if this is true.  If the value of I18<1, then I'd like to still see a value of 1.  

 

Can anyone help?  Thanks so much.  Cindy

 

5 Replies

@Cindy_TBFL 

Does this do what you want?

 

=IF(AND(O$14>=$J18,O$14<=$K18),IF(I18<1,1,2),"")

@Hans Vogelaar 

Thanks for your reply.

 

Close - I still need to plan for I18>1, 2

I'm still getting a notification there are too many formulas for the cell.  Any thoughts?

 

@Cindy_TBFL 

The formula that I posted doesn't cause an error; if you get an error message there must be another problem.

Could you explain as clearly as you can what the formula should return in each circumstance?

@Hans Vogelaar 

Please see my snapshot below.  My goal is to continue to use the "start" and "complete" dates to generate a value to the cells in the "calendar".  Additionally I'd like to assign a second fill color to differentiate between the project heading and phase columns within the project.  Project headings have no value in the "phase days" column, so I thought this would be a way to calculate various values to those cells allowing me to use conditional formatting to manipulate the fill colors. This is where I seem to be getting it wrong.

Screen Shot 2022-01-05 at 9.58.32 AM.png

 

@Hans Vogelaar
Below is a dropbox link to the file for reference. Thanks very much for your thoughts on this formula.
https://www.dropbox.com/sh/gvy9p2qktgg9c0o/AADVM8yckQOtt8ICmlj1A-Sua?dl=0