Link to home
Start Free TrialLog in
Avatar of rutgermons
rutgermons

asked on

conditioning formatting

Folks

I have a conditional format that looks at a start date in columm b and end date in c and
checks out the week numbers, if this corresponds in a weeknumber range d1 to bc1 then it highlights the cells yellow ,like so

•=AND(D$1>=WEEKNUM($B1),D$1<=WEEKNUM($C1))

what I would like is to also have have condition format the cell with a letter "X" but also, how can I build functionality that if I remove the "X" for that cell , that the code goes and changes either the start date or end date with the new revise date range

all help will do, below is the atatched sample which I already have
gannt.xlsx
Avatar of Jacques Geday
Jacques Geday
Flag of Canada image

Well put this formula in D2 and drag it right most and down as much as you want.

=IF(AND(D$1>=WEEKNUM($B2),D$1<=WEEKNUM($C2)),"X","")

chk the file
gowflow
gannt.xlsx
if I remove the "X" for that cell , that the code goes and changes either the start date or end date with the new revise date range

How would it know what the revised date would be since each "X" represents a week number?  If you remove the first "X" in a row where the start date is 1/4/2014, the revised start date could be anywhere between 1/5/2014 and 1/11/2014 since that range represents week number 2.
Avatar of rutgermons
rutgermons

ASKER

and "x"  specifies a week so it should subtract a week if removed, im conscious it might not be possible, but keen to understand if it is
Ok now I understand what you want.

Pls try this file and play with the X the way you want and see the colors changes as well as the dates. Is this what you want ???
gowflow
ganntV01.xlsx
Any chance to have tried the above solution posted ?
gowflow
doesnt work, i would like the code to work both ways, when changing the start /end dates it should set the highlighting with marking the calls yellow/x if between the spcified dates and vice versa, if I remove the x then it should update the dates itself
ok now got it !!!
You then need a mixture of macro as well !!! hmmm :)

here you are
Enjoy

I hope this does it ... play with the x .... and put dates ...
just make sure macros are activated prior to loading the file
let me know
gowflow
ganntV02.xlsm
nearly nearly, i would like all the weeks filled with a "x" so if I remove the x from week 5 then it only recalculates the end date to week 4
well even if no xxxx try what you just said and see the result
if x in wk4 then x in week 10
if you want shorter remove x from week 10 then only week4 is yellow and put where you want.

similarly if you put x in week 2 it will remove week 4 and you will have 2 to 10

gowflow
did see if I set the end date to an earlier finish date the highlighted yellow works and adjust's accordingly but the x in the orginal end date still displays
give me a specific example so I see where is what is not functioning as I tested quite long and it was working here.

What version of excel you have I developed this in Excel 2007 sometimes Excel 2010 have weired behaviours.

Let me know
gowflow
line 9, set end date to 5/5/14 (x keeps showing on 5/1/14 ,show only reflect on 5/5/14 for end date

line 9, set end date back to 5/2/14 (x keeps showing on 5/5/14 ,show only reflect on 5/2/14 for end date
ASKER CERTIFIED SOLUTION
Avatar of Jacques Geday
Jacques Geday
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks GowFlow for your hardwork, I took the easyroute and had u do the work, thanks for letting me learn from you

i may log a follow up call on this today so enhance it further
No problem tks your comments. Pls post a link in here and will b glad to assist.
gowflow
I don't get it with your new question what are you trying to achieve ?? it is not clear !!! isn't it the same as this one with the x ??

If this question is done with  please close it prior to opening new questions with the same scoope and subject !!
gowflow