Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default inverted commas

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default inverted commas

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search for inverted commas Simon S[_2_] Excel Worksheet Functions 1 July 9th 09 07:35 AM
how to copy and paste a row inverted Swerd Excel Discussion (Misc queries) 2 December 3rd 07 04:17 PM
Excel and Notepad: how avoid additional inverted commas after copy ghisirds Excel Discussion (Misc queries) 0 September 10th 07 03:48 PM
Window View inverted haitch2 Excel Discussion (Misc queries) 2 October 10th 05 01:50 PM
Graph on Inverted Scale Deepak Thakkar Charts and Charting in Excel 2 July 26th 05 08:04 AM


All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"