![]() |
setting background
I want to set the background of a cell in Excel depending on a condition.
I've tried two methods: If intVal = 3 Then CDRLWs.Range("a1").Font.Background = 3 End If If intVal = 3 Then CDRLWs.Range("a1").Font.Background = "Red" End If Neither are working. Any suggestions? Thanks in Advance! ~Elena |
setting background
CDRLWs.Range("A1").Interior.Colorindex = 3
HTH -- AP "Elena" a écrit dans le message de news: ... I want to set the background of a cell in Excel depending on a condition. I've tried two methods: If intVal = 3 Then CDRLWs.Range("a1").Font.Background = 3 End If If intVal = 3 Then CDRLWs.Range("a1").Font.Background = "Red" End If Neither are working. Any suggestions? Thanks in Advance! ~Elena |
setting background
The background color isn't changing. Any other ideas?
Thanks! "Ardus Petus" wrote: CDRLWs.Range("A1").Interior.Colorindex = 3 HTH -- AP "Elena" a écrit dans le message de news: ... I want to set the background of a cell in Excel depending on a condition. I've tried two methods: If intVal = 3 Then CDRLWs.Range("a1").Font.Background = 3 End If If intVal = 3 Then CDRLWs.Range("a1").Font.Background = "Red" End If Neither are working. Any suggestions? Thanks in Advance! ~Elena |
setting background
Disregard previous message. It works perfectly. THANK YOU!
"Ardus Petus" wrote: CDRLWs.Range("A1").Interior.Colorindex = 3 HTH -- AP "Elena" a écrit dans le message de news: ... I want to set the background of a cell in Excel depending on a condition. I've tried two methods: If intVal = 3 Then CDRLWs.Range("a1").Font.Background = 3 End If If intVal = 3 Then CDRLWs.Range("a1").Font.Background = "Red" End If Neither are working. Any suggestions? Thanks in Advance! ~Elena |
All times are GMT +1. The time now is 07:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com