format border by group

J

jackie

Dear Guru(s):

I need to format excel sheet to give each group of rows a
bold border line, each group may have different number of
rows. is it achievable in conditional format?

How can I achieve that in a macro?


Thanks in advance,

Jackie
 
D

David

How are these groups formed? Are they automated
subtotals? Subtotals manually entered, etc. Are there any
other blank rows besides or inside a group? Are they
separated by a blank row?
 
T

Tom Ogilvy

I doubt you can do it with conditional formatting - at least not without an
extensive formula specific to the location of the row.

to actually create the border, you could use the borderaround property of
the range object.

As Dave has indicated, you don't give any indication how a group of rows is
defined.
 
G

Guest

David:
Thanks for your quick response and help, I am sorry I
didn't make my question clear:

Here is the data and the format I want
Item
--------
A123
A123
--------
B231
B231
B231
--------
C123
C123
--------
D123
D123
D123
D123
---------

A border(here is the dot line) be formated by each group
of Item, don't want do subtotals, and they are not
separated by blank row and there should have not blank row
inside each group.

Hope this make my question clear, and many thanks for your
effort to help,

Jackie
 
T

Tom Ogilvy

You could do that with conditional formatting (if you can give up the bold
border and settle for a thin one).

Select Row 1 to to the last row with a value. A1 is the active cell

In conditional formatting, change Cell is to Formula is in the drop down

put in a formula like

=$A2<>$A1

then click the format button and in the border tab select a bottom border of
your choosing.
 
G

Guest

Thanks a lot, I will try!
-----Original Message-----
You could do that with conditional formatting (if you can give up the bold
border and settle for a thin one).

Select Row 1 to to the last row with a value. A1 is the active cell

In conditional formatting, change Cell is to Formula is in the drop down

put in a formula like

=$A2<>$A1

then click the format button and in the border tab select a bottom border of
your choosing.


--
Regards,
Tom Ogilvy





.
 
G

Guest

Thanks a lot, I will try!
-----Original Message-----
You could do that with conditional formatting (if you can give up the bold
border and settle for a thin one).

Select Row 1 to to the last row with a value. A1 is the active cell

In conditional formatting, change Cell is to Formula is in the drop down

put in a formula like

=$A2<>$A1

then click the format button and in the border tab select a bottom border of
your choosing.


--
Regards,
Tom Ogilvy





.
 
Top