View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_4_] Alan Beban[_4_] is offline
external usenet poster
 
Posts: 171
Default another won't work for you fine people

Sub test3001()
Range("A10").Formula = _
"=SUMPRODUCT((E3:E6=""TOTAL ACCOUNTS"")*(F3:F6))"
MsgBox Range("A10").Value
End Sub

Alan Beban

ksnapp < wrote:
here is the code.

Sub TOTHERIGHT()
Dim B As Double
Dim T As Double

Range("E3:E6").Select
CaseText = activecell.Value
Select Case (CaseText)
Case Is < "TOTAL ACCOUNTS"
activecell.Offset(0, 1).Select
B = activecell.Value
T = T + B
End Select

MsgBox (T)
End Sub

E3:E6 contains text
F3:F6 contains numbers

I want a message box that contains the sum of all the numbers to the
right of cells that don't say "TOTAL ACCOUNTS"

When I run this I get a message box that says 0


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