Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to total all the rows that are highlighted
bold above a particular cell? I would like to do this with a VBA macro. The rows that are highlighted bold change often so the macro needs to be able to sort through and total the cells that are bold. Thank You, |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
try the following user defined function public Function Sum_Bold(rng as range) Dim ret_value Dim cell as range For each cell in rng If cell.font.bold then If IsNumeric(cell.value) then ret_value = ret_value + cell.value end if end if next Sum_Bold = ret_value end Function Now use this function like =SUM_BOLD(A1:A30) -- Regards Frank Kabel Frankfurt, Germany wrote: Is there a way to total all the rows that are highlighted bold above a particular cell? I would like to do this with a VBA macro. The rows that are highlighted bold change often so the macro needs to be able to sort through and total the cells that are bold. Thank You, |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm sorry, but I do not know how to set up the user
defined function. Most of my macros are set up in modules. I have never done a public function. And the next step "=Sum_Bold (A1:A30)" is that to be done in the spreadsheet? -----Original Message----- Hi try the following user defined function public Function Sum_Bold(rng as range) Dim ret_value Dim cell as range For each cell in rng If cell.font.bold then If IsNumeric(cell.value) then ret_value = ret_value + cell.value end if end if next Sum_Bold = ret_value end Function Now use this function like =SUM_BOLD(A1:A30) -- Regards Frank Kabel Frankfurt, Germany wrote: Is there a way to total all the rows that are highlighted bold above a particular cell? I would like to do this with a VBA macro. The rows that are highlighted bold change often so the macro needs to be able to sort through and total the cells that are bold. Thank You, . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Summation | Excel Discussion (Misc queries) | |||
Summation question | Excel Worksheet Functions | |||
summation | Excel Worksheet Functions | |||
conditional summation | Excel Discussion (Misc queries) | |||
Summation from a to b | Excel Worksheet Functions |