Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I wrote a macro that calls for input from the user. the macro aska series of
4 questions and then inserts them in the next available row. I need my macro to look for the value input from the user on the first question. basically the first question will ask what is your hfc number, i want the macro to then search the sheet in column a for that value, if that val;ue is not in there then it will proceed witht he rest,however if the macro finds that same number then i want it to go to a serises of different questions to change the information to th previous hfc. is there an "if" function of some nature to do such a thing? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Some detail from the macro would be helpful. How do you get the info from
the user? Inputbox? Are you familiar with the "If" statement in Visual Basic? If not, use Visual Basic Help. Also, look at "Select Case". "chip_pyp" wrote: I wrote a macro that calls for input from the user. the macro aska series of 4 questions and then inserts them in the next available row. I need my macro to look for the value input from the user on the first question. basically the first question will ask what is your hfc number, i want the macro to then search the sheet in column a for that value, if that val;ue is not in there then it will proceed witht he rest,however if the macro finds that same number then i want it to go to a serises of different questions to change the information to th previous hfc. is there an "if" function of some nature to do such a thing? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Public Sub getdata()
Dim nextrow As Long Dim entry1 As String, entry2 As String, entry3 As String Dim entry4 As String Do nextrow = Range("A65536").End(xlUp).Row + 1 entry1 = InputBox("What is the HFC MAC?") If entry1 = "" Then Exit Sub entry2 = InputBox("What kind of modem is it?") If entry2 = "" Then Exit Sub entry3 = InputBox("Where is the modem?") If entry3 = "" Then entry3 = "Shevled" entry4 = InputBox("What's the status of the modem: Renting, Purchased or Pending") If entry4 = "" Then entry4 = "Pending" Cells(nextrow, 1) = entry1 Cells(nextrow, 2) = entry2 Cells(nextrow, 3) = entry3 Cells(nextrow, 4) = entry4 Loop End Sub thats what the macro looks like...after the user inputs the adata collected for entry1 i want the macro to search the previous entries for that one then promt other questions but if its not in there then is will insert the data to the next empty row |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search, Copy, Paste Macro in Excel | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
macro with F9 | Excel Discussion (Misc queries) | |||
Make Alignment options under format cells available as shortcut | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) |