View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default if 3 cells have data then add certain value to another cell


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Range("D1").FormulaR1C1 = _
"=IF(RC[-3]=""Y"","""",IF(RC[-2]=""Y"","""", " _
& "IF(RC[-1]=""Y"","""",""NO Y IN A1 B1 OR C1"")))"
End Sub

"Gerigto" wrote:

I would like to make cell D1 be blacked out if cells A1, B1 and C1 have a Y
in them. How do I accomplish this? Some people may enter data into D1 first
and thus eliminate any If,then formula I enter into that cell. Is there
another way around this issue?
--
TG