Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, you do need the "=IF(" rather tham "IF"
The error is telling you that when the formula is entered it doesn't make sense, just as if you typed a wonky formula into excel directly. You've got a space comma in there. Change ProbNumber & ")*4)," & ,(((SUM(LARGE(" & GrossRangeScore & ",{1,2,3})))/3)*" to ProbNumber & ")*4),(((SUM(LARGE(" & GrossRangeScore & ",{1,2,3})))/3)*" "Risky Dave" wrote: Hi, I want to insert an IF statement into a cell as an error check. This is done as part of a much larger function. The If statement is intended to make the cell blank in the event of an error (ie it returns "") and I think this is the problem I am having. I have had a look at Bob Phillips' reply to Mentos from 7/17/08 and can't work out what (apart from the greater complexity I am doing differently. The relevant lines a Dim NewRiskCounter As Integer Dim GrossRangeScore As String Dim ProbNumber As String Dim Formula As String Formula = "IF(ISERROR(((SUM(LARGE(" & GrossRangeScore & ",{1,2,3})))/3)*" & ProbNumber & ")*4)," & ,(((SUM(LARGE(" & GrossRangeScore & ",{1,2,3})))/3)*" & ProbNumber & ")*4))" Range("I" & NewriskCounter).Value = Formula The error message i am getting is: Run-time error '1004': Application-defined or object-defined error I have also tried using: ActiveCell.Formula = "=IF........" but can't get that working either. If anyone can: a) Explain in simple terms (I'm not a programmer and am learning this stuff as I go along) what the error message means b) spot where I'm going wrong I would be hugely grateful. TIA Dave |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just read your question properly - change:
ProbNumber & ")*4)," & ,(((SUM(LARGE(" & GrossRangeScore & ",{1,2,3})))/3)*" to ProbNumber & ")*4),"""",(((SUM(LARGE(" & GrossRangeScore & ",{1,2,3})))/3)*" Ignore the first response. "Sam Wilson" wrote: Hi, you do need the "=IF(" rather tham "IF" The error is telling you that when the formula is entered it doesn't make sense, just as if you typed a wonky formula into excel directly. You've got a space comma in there. Change ProbNumber & ")*4)," & ,(((SUM(LARGE(" & GrossRangeScore & ",{1,2,3})))/3)*" to ProbNumber & ")*4),(((SUM(LARGE(" & GrossRangeScore & ",{1,2,3})))/3)*" "Risky Dave" wrote: Hi, I want to insert an IF statement into a cell as an error check. This is done as part of a much larger function. The If statement is intended to make the cell blank in the event of an error (ie it returns "") and I think this is the problem I am having. I have had a look at Bob Phillips' reply to Mentos from 7/17/08 and can't work out what (apart from the greater complexity I am doing differently. The relevant lines a Dim NewRiskCounter As Integer Dim GrossRangeScore As String Dim ProbNumber As String Dim Formula As String Formula = "IF(ISERROR(((SUM(LARGE(" & GrossRangeScore & ",{1,2,3})))/3)*" & ProbNumber & ")*4)," & ,(((SUM(LARGE(" & GrossRangeScore & ",{1,2,3})))/3)*" & ProbNumber & ")*4))" Range("I" & NewriskCounter).Value = Formula The error message i am getting is: Run-time error '1004': Application-defined or object-defined error I have also tried using: ActiveCell.Formula = "=IF........" but can't get that working either. If anyone can: a) Explain in simple terms (I'm not a programmer and am learning this stuff as I go along) what the error message means b) spot where I'm going wrong I would be hugely grateful. TIA Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search for inverted commas | Excel Worksheet Functions | |||
how to copy and paste a row inverted | Excel Discussion (Misc queries) | |||
Excel and Notepad: how avoid additional inverted commas after copy | Excel Discussion (Misc queries) | |||
Window View inverted | Excel Discussion (Misc queries) | |||
Graph on Inverted Scale | Charts and Charting in Excel |