Hi
I have a table of data with product details. I want to draw a border to the rows (group of rows) based on date.
Thanks
KSK
Hi
I have a table of data with product details. I want to draw a border to the rows (group of rows) based on date.
Thanks
KSK
Hi KSK and welcome to the Forum.
You can use Conditional Formatting to do that...
In the attached revised file, I've applied outer borders only to your Raw Table Data. Then I've added a Conditional Formatting rule which draws a red bottom border "dynamically" when the date changes e.g. change cell F9 to 02/07/2023 and the red bottom border will jump to row 8.
I used the following method :
Firstly select cell F4 then go menu Home, ribbon Styles and click Conditional Formatting/New Rule... then click Use a formula...
In the requestor, under Format values... paste:
=IF(AND($F4<>"", OR(F5="",$F4<$F5)), 1, 0)
(this gives a 1 -True- when the cell in column F isn't nothing and the cell below is a higher value or blank).
Click Format... then choose the Border tab, click bottom line in Border box (I also chose a red line colour), click OK.
In New Formatting requestor, click OK
Nothing seems to happen but go Home/Styles/ Conditional Formatting/Manage Rules... then carefully change Applies to from
=$F$4
(paste over) to:
=$F$4:$K$50
(it could be =$F$4:$K$30 but I extended it past the table range to show the rule doesn't create borders outside the table).
Click Apply (or Okay) and a red bottom border will extend into columns F:K when the date in F changes (the $F in the formula does that).
If you really want to, you could devise rules to set the left and right borders (I leave that to you). If you want to learn more, look in the Tutorials section, you'll find lessons on Conditional Formatting.
Hope this fixes your problem. If so, please be sure to mark this Answer as Selected.