Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am trying to write a macro that will look at a cell in one workshee to determine the fill color of a specified range on an othe worksheet. example: if cell A1 in sheet1 = 0 then the fill color for sheet2 cells b2:d will be red. Thank ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
One way without a macro, is to use Conditional formatting on Sheet2, cells B2:D2 with a formula like =nCell=0 where nCell is a named reference to Sheet1, A1. HTH Anders Silvén "MWilliams" skrev i meddelandet ... I am trying to write a macro that will look at a cell in one worksheet to determine the fill color of a specified range on an other worksheet. example: if cell A1 in sheet1 = 0 then the fill color for sheet2 cells b2:d2 will be red. Thanks ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() If worksheets("Sheet1").range("a1").value = 0 then with worksheets("sheet2").range("b2:d2").Interior .ColorIndex = 3 .Pattern = xlSolid .PatternColorIndex = xlAutomatic end with end if if sheets are in different workbooks add worbooks("name"). befo worksheets("sheet?") eg workbooks("name").worksheets("Sheet1").range("a1 ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think you mean:
If worksheets("Sheet1").range("a1").value = 0 then with worksheets("sheet2").range("b2:d2").Interior .ColorIndex = 3 .Pattern = xlSolid . PatternColorIndex = xlAutomatic end with end if -- Regards, Tom Ogilvy "mudraker" wrote in message ... If worksheets("Sheet1").range("a1").value = 0 then with worksheets("sheet2").range("b2:d2").Interior ColorIndex = 3 Pattern = xlSolid PatternColorIndex = xlAutomatic end with end if if sheets are in different workbooks add worbooks("name"). befor worksheets("sheet?") eg workbooks("name").worksheets("Sheet1").range("a1" ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need help with formating cell | Excel Discussion (Misc queries) | |||
need help formating a cell | Excel Worksheet Functions | |||
Cell Formating | Excel Discussion (Misc queries) | |||
Cell to follow content AND/OR formating of another cell | Excel Discussion (Misc queries) | |||
CELL FORMATING | Excel Discussion (Misc queries) |