Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Glad to help out....
Mark Ivey "Dexter" wrote in message ... thank you!!its working perfect and i will make some modifications to customize it for my needs thank you Mark Ivey wrote: See if this will work for your needs... Mark Ivey Sub test() Dim mySize As Integer Dim myType As String Dim myQuantity As Integer Dim myNumber As Integer Dim myResult As Long mySize = InputBox("Input your desired size", "Input Size") If mySize = 25 And mySize <= 35 Then myType = "A" ElseIf mySize = 36 And mySize <= 45 Then myType = "B" ElseIf mySize = 46 And mySize <= 55 Then myType = "C" Else: myType = "" MsgBox "Please input a size between 25 to 55" Exit Sub End If myQuantity = InputBox("Input a quantity", "Input Quantity") If myQuantity < 1 Or myQuantity 50 Then MsgBox "Please input a quantity between 1 to 50" Exit Sub End If myNumber = InputBox("Input a number", "Input Number") If myNumber < 5 Or myNumber 20 Then MsgBox "Please input a number between 5 to 20" Exit Sub End If myResult = (mySize * myQuantity) / myNumber MsgBox "Type: " & myType & vbCrLf & vbCrLf & _ "Result: " & myResult, vbOKOnly End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel question borderline programing | New Users to Excel | |||
totally newbie to VBA need help | Excel Programming | |||
Microsoft excel macros Programing. | Excel Programming | |||
Sharing macros - extreme newbie question I know. | Excel Programming | |||
Sharing macros - extreme newbie question I know. | Excel Programming |