Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I want to get multiple entries to paste to another sheet. I have the
following input box working to request one entry. Can anyone tell me how to use the same box for multiple requests to append to "Sheet1"? Also, if entry is wrong, I need to just return them back to the input box. Please forgive any mistakes, I just had brain surgery...Really!! Market = Application.InputBox("Enter your market") Sheets("Daily_info").Select Range("A1").Select Selection.AutoFilter Selection.AutoFilter Field:=18, Criteria1:=Market, Operator:=xlAnd Range("A1").Select Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select Selection.Copy Sheets("Sheet1").Select ActiveSheet.Paste |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Here's how I do it:
Dim ReportTime As String Dim strDate As String Dim strTime As String ReportTime = InputBox("Enter date and time (24-hour time format):" & vbCr & vbCr & "Ex: 8/1/2008 18:30 (for 6:30 pm).") strDate = Left$(ReportTime, WorksheetFunction.Find(" ", ReportTime) - 1) strTime = Right$(ReportTime, Len(ReportTime) - WorksheetFunction.Find(" ", ReportTime)) After you run this, the two separate elements from the Inputbox are stored in two string variables. HTH, JP On Aug 11, 2:26*pm, Megadrone wrote: I want to get multiple entries to paste to another sheet. I have the following input box working to request one entry. Can anyone tell me how to use the same box for multiple requests to append to "Sheet1"? Also, if entry is wrong, I need to just return them back to the input box. Please forgive any mistakes, I just had brain surgery...Really!! Market = Application.InputBox("Enter your market") * * Sheets("Daily_info").Select * * Range("A1").Select * * Selection.AutoFilter * * Selection.AutoFilter Field:=18, Criteria1:=Market, Operator:=xlAnd * * Range("A1").Select * * Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select * * Selection.Copy * * Sheets("Sheet1").Select * * ActiveSheet.Paste |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I do believe I was misunderstood, I want them to enter an item in the input
box (it is them pasted to Sheet1) then I want them to be able to return to the input box and enter another item and so on. when they are finished I want some way to end the input function. "JP" wrote: Here's how I do it: Dim ReportTime As String Dim strDate As String Dim strTime As String ReportTime = InputBox("Enter date and time (24-hour time format):" & vbCr & vbCr & "Ex: 8/1/2008 18:30 (for 6:30 pm).") strDate = Left$(ReportTime, WorksheetFunction.Find(" ", ReportTime) - 1) strTime = Right$(ReportTime, Len(ReportTime) - WorksheetFunction.Find(" ", ReportTime)) After you run this, the two separate elements from the Inputbox are stored in two string variables. HTH, JP On Aug 11, 2:26 pm, Megadrone wrote: I want to get multiple entries to paste to another sheet. I have the following input box working to request one entry. Can anyone tell me how to use the same box for multiple requests to append to "Sheet1"? Also, if entry is wrong, I need to just return them back to the input box. Please forgive any mistakes, I just had brain surgery...Really!! Market = Application.InputBox("Enter your market") Sheets("Daily_info").Select Range("A1").Select Selection.AutoFilter Selection.AutoFilter Field:=18, Criteria1:=Market, Operator:=xlAnd Range("A1").Select Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select Selection.Copy Sheets("Sheet1").Select ActiveSheet.Paste |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Inputbox returns "" when Cancel is pressed. Wrap the Inputbox in a Do
Loop that checks if the returned string is "", then you know the user is finished. Otherwise it keeps looping and asking for more input. You can also do simply data validation on the inputted string, for example IsDate() to make sure the user entered a valid date. Anything more complicated than that, an Inputbox is inadequate; you'd want to use a userform. Dim ReportTime As String Dim strDate As String Dim strTime As String Do Until ReportTime = "" ReportTime = InputBox("Enter date and time (24-hour time format):" & vbCr & vbCr & "Ex: 8/1/2008 18:30 (for 6:30 pm).") strDate = Left$(ReportTime, WorksheetFunction.Find(" ", ReportTime) - 1) strTime = Right$(ReportTime, Len(ReportTime) - WorksheetFunction.Find(" ", ReportTime)) Loop On Aug 11, 3:06*pm, Megadrone wrote: I do believe I was misunderstood, I want them to enter an item in the input box (it is them pasted to Sheet1) then I want them to be able to return to the input box and enter another item and so on. *when they are finished I want some way to end the input function. "JP" wrote: Here's how I do it: Dim ReportTime As String Dim strDate As String Dim strTime As String ReportTime = InputBox("Enter date and time (24-hour time format):" & vbCr & vbCr & "Ex: *8/1/2008 18:30 (for 6:30 pm).") strDate = Left$(ReportTime, WorksheetFunction.Find(" ", ReportTime) - 1) strTime = Right$(ReportTime, Len(ReportTime) - WorksheetFunction.Find(" ", ReportTime)) After you run this, the two separate elements from the Inputbox are stored in two string variables. HTH, JP On Aug 11, 2:26 pm, Megadrone wrote: I want to get multiple entries to paste to another sheet. I have the following input box working to request one entry. Can anyone tell me how to use the same box for multiple requests to append to "Sheet1"? Also, if entry is wrong, I need to just return them back to the input box. Please forgive any mistakes, I just had brain surgery...Really!! Market = Application.InputBox("Enter your market") * * Sheets("Daily_info").Select * * Range("A1").Select * * Selection.AutoFilter * * Selection.AutoFilter Field:=18, Criteria1:=Market, Operator:=xlAnd * * Range("A1").Select * * Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select * * Selection.Copy * * Sheets("Sheet1").Select * * ActiveSheet.Paste- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
"read" inputs past end of file | Excel Discussion (Misc queries) | |||
When I input "25:03" as a time, it reads "1:03" | Excel Discussion (Misc queries) | |||
Multiple "source" workbooks linked to single "destination" workboo | Excel Worksheet Functions | |||
Is there a function like "Data Table" for multiple Inputs | Excel Worksheet Functions |