LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default check criteria and run macro

thanx bob ur code works...

but now how do i change it to go and check on sheet named "inputpage" for
row a and b?

im going to put a cmdbutton on about 10 or 12 sheets and need this macro to
then go and check on the "inputpage" for that word/number combination

and where do i tell it to a macro called editsheet if the number enterd is
correct?



much appreciated






Sub Test()
Dim mpRow As Long
Dim mpWord As String
Dim mpResult As Double

mpRow = Int(Rnd() * 25 + 1)
mpWord = Cells(mpRow, "A").Value

On Error Resume Next
mpResult = InputBox("provide a number for " & mpWord)
On Error GoTo 0
If mpResult < 0 Then

If mpResult < Cells(mpRow, "B").Value Then

MsgBox "Wrong"
Else

Cells(mpRow, "A").Value = ""
End If
End If
End Sub


 
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
how to check More than one criteria and get the value manju Excel Worksheet Functions 1 January 28th 08 02:54 PM
Countif and date check for second criteria [email protected] Excel Worksheet Functions 0 November 29th 05 09:40 PM
Countif and date check for second criteria [email protected] Excel Worksheet Functions 0 November 29th 05 09:40 PM
How do I use a "check(ed) box" as a criteria in an "=if" statement Bill Bromback Excel Worksheet Functions 1 August 19th 05 05:28 PM
Need formula to check values of data in several cells as criteria VCTECH Excel Worksheet Functions 0 November 19th 04 09:54 PM


All times are GMT +1. The time now is 07:28 AM.

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"