View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Spiky Spiky is offline
external usenet poster
 
Posts: 622
Default How can I test a range of cells for the presence of a border?

On Nov 2, 10:08*pm, PFB wrote:
Excel 2007 / Vista
I have a scheduling worksheet showing individuals' names indicating in which
area they will work on each day of the month. *A subgroup of workers has
their cumulative shifts assigned first to a "place holder name", and then
each of those shifts is assigned to one of five individuals in the subgroup. *
As the individual assignments are made the cell changes color based on
conditional fomatting for each name. *However, I need to keep a count of the
cells in each column that orriginally displayed the "place holder name". *I
thought I would assign borders to those cells before changing them to the
individuals' names and then COUNTIF() the number of cells in each column that
had borders (unchanged), but I can't find any way to count the number of
cells in a range that have a particular border .


You'll need a UDF to access formats in a formula, at least for more
than one cell. There is one in the morefunc group (search for it at
download.com) that would work. Or someone with the skills could write
a UDF. If you were to download this UDF and use it, this formula
should work to count all cells with a bottom border:
=SUMPRODUCT(--(XLM.GET.CELL(12,A2:A100)0))

I don't have xl2007, and it has apparently changed VBA a bit, so I
can't vouch for this working in that version.