Auto color gantt chart

haziqFARHAN

New Member
Joined
Nov 24, 2021
Messages
4
Office Version
  1. 2019
Platform
  1. Windows
1637740561987.png

Hi I have a problem. the colour is fill automatically by formula referring "maintenance start date" and "maintenance complete date'.
How to combine the colour merge refer "name" ?

an example if the name is "AFD" have 4x then the colour is just fill in one row only. no need to fill 4 rows.
i stuck here. hope can help
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
On the bottom, I left the formulas spread out a bit below to make it easier to understand.

MrExcelPlayground5.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
1NameMachineStartFinishThingItemDateStartFinish6:557:358:058:359:059:3510:0510:3511:0511:3512:0512:3513:0513:3514:0514:3515:0515:3516:0516:3517:0517:3518:05
2AFD9163/4/2021 7:083/4/2021 12:42B15A3/4/20217:08:00 AM12:42:00 PMFALSETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUEFALSEFALSEFALSEFALSEFALSEFALSETRUEFALSEFALSE
3AFDCCR103/4/2021 8:563/4/2021 12:15B15A3/4/20218:56:00 AM12:15:00 PMFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSE
4AFD9233/4/2021 12:313/4/2021 13:58B15A3/4/202112:31:00 PM1:58:00 PMFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSE
5AFDCCR103/4/2021 16:553/4/2021 17:28B15A3/4/20214:55:00 PM5:28:00 PMFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSE
6AHF1613/4/2021 9:553/4/2021 12:39B18A3/4/20219:55:00 AM12:39:00 PMFALSEFALSEFALSEFALSEFALSEFALSETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUE
7AHF0193/4/2021 10:593/4/2021 19:57B18A3/4/202110:59:00 AM7:57:00 PMFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSE
8AMSF0103/4/2021 7:233/4/2021 7:50B18A3/4/20217:23:00 AM7:50:00 AMFALSETRUEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSE
9
10
11NameMachineStartFinishThingItemDateStartFinish6:557:358:058:359:059:3510:0510:3511:0511:3512:0512:3513:0513:3514:0514:3515:0515:3516:0516:3517:0517:3518:05
12AFD9163/4/2021 7:083/4/2021 12:42B15A3/4/20217:08:00 AM12:42:00 PM07:08:00 AM12:42:00 PMTRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSE
13AFDCCR103/4/2021 8:563/4/2021 12:15B15A3/4/20218:56:00 AM12:15:00 PM8:56:00 AM12:15:00 PM
14AFD9233/4/2021 12:313/4/2021 13:58B15A3/4/202112:31:00 PM1:58:00 PM12:31:00 PM1:58:00 PM
15AFDCCR103/4/2021 16:553/4/2021 17:28B15A3/4/20214:55:00 PM5:28:00 PM4:55:00 PM5:28:00 PM
16AHF1613/4/2021 9:553/4/2021 12:39B18A3/4/20219:55:00 AM12:39:00 PM
17AHF0193/4/2021 10:593/4/2021 19:57B18A3/4/202110:59:00 AM7:57:00 PM
18AMSF0103/4/2021 7:233/4/2021 7:50B18A3/4/20217:23:00 AM7:50:00 AM
Sheet12
Cell Formulas
RangeFormula
K1,K11K1=J1+40/60/24
L1:AF1,L11:AF11L1=K1+30/60/24
G2:G8,G12:G18G2=INT(C2)
H2:I8,H12:I18H2=MOD(C2,1)
J2:J8J2=IF($A2<>$A1,SUM((IFERROR(INDEX($H$2:$H$8,1/(1/((INDEX($A$2:$A$8,ROW($A$2:$A$8)-ROW($A$2)+1,1)=$A$2)*(ROW($A$2:$A$8)-ROW($A$2)+1))),1),"")<=J$1)*(IFERROR(INDEX($I$2:$I$8,1/(1/((INDEX($A$2:$A$8,ROW($A$2:$A$8)-ROW($A$2)+1,1)=$A$2)*(ROW($A$2:$A$8)-ROW($A$2)+1))),1),"")>=J$1))>0,FALSE)
K2:AF8K2=IF($A2<>$A1,SUM((IFERROR(INDEX($H$2:$H$8,1/(1/((INDEX($A$2:$A$8,ROW($A$2:$A$8)-ROW($A$2)+1,1)=$A2)*(ROW($A$2:$A$8)-ROW($A$2)+1))),1),"")<=K$1)*(IFERROR(INDEX($I$2:$I$8,1/(1/((INDEX($A$2:$A$8,ROW($A$2:$A$8)-ROW($A$2)+1,1)=$A2)*(ROW($A$2:$A$8)-ROW($A$2)+1))),1),"")>=K$1))>0,FALSE)
N12:AF12N12=SUM(($K$12<=K$11)*($L$12>=K$1))>0
J12J12=IF(A12<>A11,,)
K12:K18K12=IFERROR(INDEX($H$12:$H$18,1/(1/((INDEX($A$12:$A$18,ROW($A$12:$A$18)-ROW($A$12)+1,1)=$A$12)*(ROW($A$12:$A$18)-ROW($A$12)+1))),1),"")
L12:L18L12=IFERROR(INDEX($I$12:$I$18,1/(1/((INDEX($A$12:$A$18,ROW($A$12:$A$18)-ROW($A$12)+1,1)=$A$12)*(ROW($A$12:$A$18)-ROW($A$12)+1))),1),"")
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
J2:AF8Expression=NOT(J2)textNO
J2:AF8Expression=J2textNO
 
Upvote 0
Hi Sir, thank you very much. For current formula I insert in Conditional Formatting as below image and not in each cell.
1637797275539.png

Is it possible to make as I wanted by only insert he formula in this Conditional Formatting ?
 
Upvote 0
I usually just put the whole formula into the conditional formatting only. I didn't like the putting values into the cells and then using that to format. But when I put the formula straight into conditional formatting, it wasn't working right. I didn't have time to get to the bottom of it.
 
Upvote 0

Forum statistics

Threads
1,214,864
Messages
6,121,981
Members
449,058
Latest member
oculus

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