Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I want to do a Subtotal in excel and I want to create a macro to format the cell that contains the subtotal formula, my problem is that my file might change so if I specified in my macro Cell A12 to format, but my Subtotal might not be there might be in A14 depending if there's more data in the file. So want to do my macro to format cells that have the Subtotal formula. Any help would be very appreciated, thanks, juan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can give a name to the cell which contains the subtotal (i.e. : toto
Menu : Insert Name Define.. Then in your code you can refer it with its nam in VBA : Me.Range("toto").valu in Excel formula : =IF(toto=0,"-","OK" If you want to format a cell, you can use the "Conditional Formatting", it's quicker than VBA macr Menu : Format Conditional Formatting.. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sort macro, subtotal and add lines after subtotal | Excel Discussion (Misc queries) | |||
Macro add row and subtotal | Excel Discussion (Misc queries) | |||
macro excel subtotal in subtotal | Excel Discussion (Misc queries) | |||
Contitional Format SubTotal Line | Excel Discussion (Misc queries) | |||
Subtotal + Conditional Format Question | Excel Programming |