Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Sherry
 
Posts: n/a
Default VBA Functions Excel 2002

Please help.
I have created a Function (see below) but regardles of the numbers I enter,
I can only get one result to display. That result is Poor-Improving
Grrrr! What am I missing here? can anyone help-Please!!!

Function EvalAll(OverallEval As Double)

If RecentEvaluation = OverallEvaluation And OverallEvaluation 4 Then
EvalAll = "Good-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation < 4 Then
EvalAll = "Poor-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation 4 Then
EvalAll = "Good-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation 4 Then
EvalAll = "Poor-Interview"

End If
End Function

I have looked at this for so long without success and now I am not sure what
I am doing anymore!!!

Cheers Sherry
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi Sherry

two problems as i see it
one - you're only passing in the OverallEval parameter not the
RecentEvaluation parameter
two - you're passing in a parameter called "OverallEval" but calling it
"OveralLEvaluation" in the function itself


--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"Sherry" wrote in message
...
Please help.
I have created a Function (see below) but regardles of the numbers I
enter,
I can only get one result to display. That result is Poor-Improving
Grrrr! What am I missing here? can anyone help-Please!!!

Function EvalAll(OverallEval As Double)

If RecentEvaluation = OverallEvaluation And OverallEvaluation 4 Then
EvalAll = "Good-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation < 4
Then
EvalAll = "Poor-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation 4
Then
EvalAll = "Good-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation 4
Then
EvalAll = "Poor-Interview"

End If
End Function

I have looked at this for so long without success and now I am not sure
what
I am doing anymore!!!

Cheers Sherry



  #3   Report Post  
Sherry
 
Posts: n/a
Default

Hello JulieD

I am sorry but I do not understand what you mean by passing in the parameter!!

I did however pick up on typo of OverallEval that should have been
OverallEvaluation

Any further elaboration would be helpful

Thank You Cheers Sherry

"JulieD" wrote:

Hi Sherry

two problems as i see it
one - you're only passing in the OverallEval parameter not the
RecentEvaluation parameter
two - you're passing in a parameter called "OverallEval" but calling it
"OveralLEvaluation" in the function itself


--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"Sherry" wrote in message
...
Please help.
I have created a Function (see below) but regardles of the numbers I
enter,
I can only get one result to display. That result is Poor-Improving
Grrrr! What am I missing here? can anyone help-Please!!!

Function EvalAll(OverallEval As Double)

If RecentEvaluation = OverallEvaluation And OverallEvaluation 4 Then
EvalAll = "Good-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation < 4
Then
EvalAll = "Poor-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation 4
Then
EvalAll = "Good-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation 4
Then
EvalAll = "Poor-Interview"

End If
End Function

I have looked at this for so long without success and now I am not sure
what
I am doing anymore!!!

Cheers Sherry




  #4   Report Post  
Gary's Student
 
Posts: n/a
Default

How does your macro know the value of RecentEvaluation?
--
Gary's Student


"Sherry" wrote:

Hello JulieD

I am sorry but I do not understand what you mean by passing in the parameter!!

I did however pick up on typo of OverallEval that should have been
OverallEvaluation

Any further elaboration would be helpful

Thank You Cheers Sherry

"JulieD" wrote:

Hi Sherry

two problems as i see it
one - you're only passing in the OverallEval parameter not the
RecentEvaluation parameter
two - you're passing in a parameter called "OverallEval" but calling it
"OveralLEvaluation" in the function itself


--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"Sherry" wrote in message
...
Please help.
I have created a Function (see below) but regardles of the numbers I
enter,
I can only get one result to display. That result is Poor-Improving
Grrrr! What am I missing here? can anyone help-Please!!!

Function EvalAll(OverallEval As Double)

If RecentEvaluation = OverallEvaluation And OverallEvaluation 4 Then
EvalAll = "Good-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation < 4
Then
EvalAll = "Poor-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation 4
Then
EvalAll = "Good-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation 4
Then
EvalAll = "Poor-Interview"

End If
End Function

I have looked at this for so long without success and now I am not sure
what
I am doing anymore!!!

Cheers Sherry




  #5   Report Post  
Duke Carey
 
Posts: n/a
Default

The first, third, and fourth of your conditions are the same:

RecentEvaluation = OverallEvaluation And OverallEvaluation 4

and in ALL 4 cases you are testing for RecentEvaluation = OverallEvaluation

How about
====================================
If RecentEvaluation = OverallEvaluation Then
If OverallEvaluation 4 Then
EvalAll = "Good-Improving"
Else
EvalAll = "Poor-Improving"
End If
Else
' this portion is in case RecentEvaluation < OverallEvaluation
If OverallEvaluation 4 Then
EvalAll = "??"
Else
EvalAll = "Poor-Interview??"
End If
End If
===================================

If RecentEvaluation = OverallEvaluation then


"Sherry" wrote:

Please help.
I have created a Function (see below) but regardles of the numbers I enter,
I can only get one result to display. That result is Poor-Improving
Grrrr! What am I missing here? can anyone help-Please!!!

Function EvalAll(OverallEval As Double)

If RecentEvaluation = OverallEvaluation And OverallEvaluation 4 Then
EvalAll = "Good-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation < 4 Then
EvalAll = "Poor-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation 4 Then
EvalAll = "Good-Improving"
ElseIf RecentEvaluation = OverallEvaluation And OverallEvaluation 4 Then
EvalAll = "Poor-Interview"

End If
End Function

I have looked at this for so long without success and now I am not sure what
I am doing anymore!!!

Cheers Sherry

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
Excel 2003 versus 2002 seem incompatible related to the EDATE fun. MCLENO Excel Worksheet Functions 1 April 20th 05 08:34 PM
Excel XP 2002 Vs. Excel 2000 Samantha Excel Discussion (Misc queries) 0 April 18th 05 03:54 PM
Excel 2002 help Rob Excel Worksheet Functions 1 January 12th 05 11:26 PM
Macro in Excel 2002 to save a workbook to a FTP location Lloyd Excel Discussion (Misc queries) 0 December 21st 04 02:49 PM
Can you print labels using Excel 2002 in a Word 2002 mail merge? Individual_ Excel Discussion (Misc queries) 3 December 17th 04 08:39 PM


All times are GMT +1. The time now is 02:39 PM.

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

About Us

"It's about Microsoft Excel"