Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sumif not equal to
I've tried both options and end up with the same thing. MyFormula = "ode"
Here's exactly how I have it written (with the option since it was the last one tried) MyFormula = Mid(ActiveCell.Formula, 2, Len(ActiveCell.Formula)) ActiveCell.Formula = "=IF(ISERROR(" & MyFormula & "),"",(" & MyFormula & "))" Also if it helps here's what I'm changing from and to: =AVERAGE(OFFSET(C15,-3,0,-12,1)) =IF(ISERROR(AVERAGE(OFFSET(C15,-3,0,-12,1))),"",(AVERAGE(OFFSET(C15,-3,0,-12,1)))) "StephanieH" wrote: I need to sum column B if column A does not contact the words Large Balance. I'm not sure how or where to designate the not like part. Application.WorksheetFunction.SumIf(Columns("A") , < "Large Balance", Columns("B")) returns a syntax error |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sumif not equal to
You have to double up those double quotes in strings:
MyFormula = Mid(ActiveCell.Formula, 2, Len(ActiveCell.Formula)) ActiveCell.Formula = "=IF(ISERROR(" & MyFormula & "),"""",(" & MyFormula & "))" or MyFormula = Mid(ActiveCell.Formula, 2) ActiveCell.Formula = "=IF(ISERROR(" & MyFormula & "),"""",(" & MyFormula & "))" Excel's =Mid() function works differently than VBA's Mid function. You don't need to specify that last parm. StephanieH wrote: I've tried both options and end up with the same thing. MyFormula = "ode" Here's exactly how I have it written (with the option since it was the last one tried) MyFormula = Mid(ActiveCell.Formula, 2, Len(ActiveCell.Formula)) ActiveCell.Formula = "=IF(ISERROR(" & MyFormula & "),"",(" & MyFormula & "))" Also if it helps here's what I'm changing from and to: =AVERAGE(OFFSET(C15,-3,0,-12,1)) =IF(ISERROR(AVERAGE(OFFSET(C15,-3,0,-12,1))),"",(AVERAGE(OFFSET(C15,-3,0,-12,1)))) "StephanieH" wrote: I need to sum column B if column A does not contact the words Large Balance. I'm not sure how or where to designate the not like part. Application.WorksheetFunction.SumIf(Columns("A") , < "Large Balance", Columns("B")) returns a syntax error -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to sumif in excel with a not equal criteria | New Users to Excel | |||
SUMIF using 2 cells that equal each other | Excel Discussion (Misc queries) | |||
SUMIF Greater than or equal to | Excel Worksheet Functions | |||
Sumif not equal to | Excel Programming | |||
sumif if cell does not equal #N/A | Excel Discussion (Misc queries) |