View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
bforster1[_11_] bforster1[_11_] is offline
external usenet poster
 
Posts: 1
Default formatting cells

I am attempting to have certain cells on a spreadsheet format based on
the contents of a single cell. I have tried the following code byt get
a "type mismatch" error. Any suggestions??

Sub FormatIncStmtAssump()
If Sheets("IncStmtAssump").Range("B11").Value = "% of Revenue" Then
Sheets("IncStmtAssump").Range("C11:H11").Value =
Format(Sheets("IncStmtAssump").Range("C11:H11").Va lue, "0.00%")
If Sheets("IncStmtAssump").Range("B11").Value = "Input" Then
Sheets("IncStmtAssump").Range("C11:H11").Value =
Format(Sheets("IncStmtAssump").Range("C11:H11").Va lue, "$#,##0")
If Sheets("IncStmtAssump").Range("B11").Value = "$ Change from
Previous Year" Then Sheets("IncStmtAssump").Range("C11:H11").Value =
Format(Sheets("IncStmtAssump").Range("C11:H11").Va lue, "$#,##0")
End Sub


---
Message posted from http://www.ExcelForum.com/