Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
TH
 
Posts: n/a
Default Excel should speak results of logical formula

I'd like to create a logical formula i.e. if X = Y, "A","B", and have excel
speak the result. Any ideas ?

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions
  #2   Report Post  
Jerry W. Lewis
 
Posts: n/a
Default

If
=IF(X=Y,"A","B")
is not what you want, then try explaining in much greater detail.

Jerry

TH wrote:

I'd like to create a logical formula i.e. if X = Y, "A","B", and have excel
speak the result. Any ideas ?


  #3   Report Post  
TH
 
Posts: n/a
Default

Jerry

I'm trying to teach my son times tables. If he types in the correct answer I
would like excel to say "Correct" or "Try Again" if he gets it wrong. Hence
the use of logic formula to generate the phrase. However while Excel will
speak the number he types in (once he presses return), it will not speak the
phrase generated by the logical formula. I wondered if there was a function
to place in the logic formula to make Excel speak the result. Hope ths
clarifies.


"Jerry W. Lewis" wrote:

If
=IF(X=Y,"A","B")
is not what you want, then try explaining in much greater detail.

Jerry

TH wrote:

I'd like to create a logical formula i.e. if X = Y, "A","B", and have excel
speak the result. Any ideas ?



  #4   Report Post  
Dana DeLouis
 
Posts: n/a
Default

Hi TH. Here's a slightly different idea then a regular worksheet function.
This simple demo has you place your numbers in the top row, and first
column.
Place this code on the worksheet module.
Then, you fill in the table as a multiplication table.
I threw in a Mod function to occasionally change the "correct" result.
Adjust sayings to your preferences.
HTH. :)

Option Explicit
Public Say As Speech ' <-- Make sure

Private Sub Worksheet_Change(ByVal Target As Range)
'= = = = = = = = = = = = = =
'// Place code on the sheet module
'// If your table of numbers is in the top row,
'// and left column, fill in the table
'// with the multiplication values.
'// Excel will speak the results.
'// Adjust sayings to what you would like.
'// By: Dana DeLouis
'= = = = = = = = = = = = = =

Dim R As Long
Dim C As Long

If Say Is Nothing Then Set Say = Application.Speech
R = Target.Row
C = Target.Column

'// Limit your range here...
If R = 1 Or C = 1 Then Exit Sub


Select Case Cells(R, 1) * Cells(1, C) = Target.Value
Case True
If Round(Rnd * 3) = 0 Then
Say.Speak "Excellent, John", True
Else
Say.Speak "Correct", True
End If
Case False
Say.Speak "Incorrect, please try again", True
End Select
End Sub


--
Dana DeLouis
Win XP & Office 2003


"TH" wrote in message
...
Jerry

I'm trying to teach my son times tables. If he types in the correct answer
I
would like excel to say "Correct" or "Try Again" if he gets it wrong.
Hence
the use of logic formula to generate the phrase. However while Excel will
speak the number he types in (once he presses return), it will not speak
the
phrase generated by the logical formula. I wondered if there was a
function
to place in the logic formula to make Excel speak the result. Hope ths
clarifies.


"Jerry W. Lewis" wrote:

If
=IF(X=Y,"A","B")
is not what you want, then try explaining in much greater detail.

Jerry

TH wrote:

I'd like to create a logical formula i.e. if X = Y, "A","B", and have
excel
speak the result. Any ideas ?





  #5   Report Post  
Dana DeLouis
 
Posts: n/a
Default

Well, I've never tried it like a function along the lines that you want to
use it.
Looks like it works just fine. So, perhaps a more simple version...
You can place this on a regular module sheet...

Function Check(X, Y)
If X = Y Then
Application.Speech.Speak "Correct", True
Else
Application.Speech.Speak "Try Again", True
End If
End Function

On a worksheet...
=Check(A1,B1)

--
Dana DeLouis
Win XP & Office 2003


"Dana DeLouis" wrote in message
...
Hi TH. Here's a slightly different idea then a regular worksheet
function.
This simple demo has you place your numbers in the top row, and first
column.
Place this code on the worksheet module.
Then, you fill in the table as a multiplication table.
I threw in a Mod function to occasionally change the "correct" result.
Adjust sayings to your preferences.
HTH. :)

Option Explicit
Public Say As Speech ' <-- Make sure

Private Sub Worksheet_Change(ByVal Target As Range)
'= = = = = = = = = = = = = =
'// Place code on the sheet module
'// If your table of numbers is in the top row,
'// and left column, fill in the table
'// with the multiplication values.
'// Excel will speak the results.
'// Adjust sayings to what you would like.
'// By: Dana DeLouis
'= = = = = = = = = = = = = =

Dim R As Long
Dim C As Long

If Say Is Nothing Then Set Say = Application.Speech
R = Target.Row
C = Target.Column

'// Limit your range here...
If R = 1 Or C = 1 Then Exit Sub


Select Case Cells(R, 1) * Cells(1, C) = Target.Value
Case True
If Round(Rnd * 3) = 0 Then
Say.Speak "Excellent, John", True
Else
Say.Speak "Correct", True
End If
Case False
Say.Speak "Incorrect, please try again", True
End Select
End Sub


--
Dana DeLouis
Win XP & Office 2003


"TH" wrote in message
...
Jerry

I'm trying to teach my son times tables. If he types in the correct
answer I
would like excel to say "Correct" or "Try Again" if he gets it wrong.
Hence
the use of logic formula to generate the phrase. However while Excel will
speak the number he types in (once he presses return), it will not speak
the
phrase generated by the logical formula. I wondered if there was a
function
to place in the logic formula to make Excel speak the result. Hope ths
clarifies.


"Jerry W. Lewis" wrote:

If
=IF(X=Y,"A","B")
is not what you want, then try explaining in much greater detail.

Jerry

TH wrote:

I'd like to create a logical formula i.e. if X = Y, "A","B", and have
excel
speak the result. Any ideas ?








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
converting formula from lotus.123 to excel zaharah Excel Worksheet Functions 2 July 27th 05 03:04 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
put formula results into a different cell if it is empty PutFormula Excel Worksheet Functions 2 February 11th 05 03:31 AM


All times are GMT +1. The time now is 04:28 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"