Forum Discussion
Jerry Pinto
Feb 20, 2018Copper Contributor
Date time punch formua
Good afternoon all,
Looking for assistance with building a formula. In short, i want it to search for any gaps between Column "B" and column "C". Additionally i would like to build a rule so id...
Willy Lau
Feb 21, 2018Steel Contributor
Assume your table starting from A1 (Header "DATED" at A1).
I am not sure how many rows you have in the worksheet. If the size is small, try
- Create a name in Name Manager, Data (Assume 300 records)
=Sheet1!$A$1:$A$301
- Select cell A2, create a name in Name Manger, FirstRow
=AGGREGATE(15,3,MATCH(Data,Sheet1!$A2,0)*ROW(Data),1)
- Select cell A2, create a name in Name Manger, LastRow
=AGGREGATE(14,3,MATCH(Data,Sheet1!$A2,0)*ROW(Data),1)
- Select cell A2, create a name in Name Manger, DateData
=OFFSET(Sheet1!$A$2, FirstRow - 2, 0, LastRow - FirstRow + 1)
- Select A2, use the following formula for Conditional Formatting Rule
=SUMPRODUCT(N(DateData=OFFSET(DateData,1,0)),N(OFFSET(DateData,0,2)<>OFFSET(DateData,1,1)))
- Change the Applies To of the CF rule to (Assume 300 records)
=$A$2:$C$301
If you have many records, the above approach will be slow. You may need to use helper columns.
- In cell D2, type
=IF($A1=$A2,$D1,ROW($A2))
- Copy D2, paste to D3:D301 (Assume 300 records)
- In cell E2, type
=IF($A2=$A3,$E3,ROW($A2))
- Copy E2, paste to E3:E301 (Assume 300 records)
- Select D2, create a name in Name Manager, DateData2
=OFFSET(Sheet1!$A$2, Sheet1!$D2-2, 0, Sheet1!$E2-Sheet1!$D2+1)
- Select A2, use the following formula for Conditional Formatting Rule
=SUMPRODUCT(N(DateData2=OFFSET(DateData2,1,0)),N(OFFSET(DateData2,0,2)<>OFFSET(DateData2,1,1)))
- Change the Applies To of the CF rule to (Assume 300 records)
=$A$2:$C$301
- Hide column D and E