Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am really new to VBA. I am building a tool that extracts random records
using the row numbers in Excel. The random numbers are generated by an outside source and come in the format '123, 456, 789' I've created a code that exctracts rows 123, 456, 789. '///////////CODE BEGINS HERE///////////// Range("A123,A456,A789").EntireRow.Copy Sheets("Sample").Select ActiveSheet.Range("A1").Select ActiveCell.PasteSpecial (xlPasteValuesAndNumberFormats) Application.CutCopyMode = False End Sub '//////////CODE ENDS HERE////////////////// To get to this point requires a lot of massaging of the numbers in VBA (adding the 'A' and removing the spaces) usually using global search and replace. This is simple enough for me, but not simple enough for some end users. I want to use an input box or other pop-up type tool imbedded in the macro that allows the user to input the numbers as a group (copy and paste in one step) in the format supplied to them (e.g. '123, 456, 789') that will automatically convert them to the correct format (e.g. 'A123,A456,A789') and then update the RANGE line of the macro built above before the macro continues past this point. Any help will be appreciated. Thanks, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Drop Down--How do I copy and update cell link/input range | Excel Discussion (Misc queries) | |||
Combo Box input range automatic update | Excel Discussion (Misc queries) | |||
Macro to update pivot table data range | Excel Programming | |||
Macro to change list box input range based on selection made in another cell | Excel Programming | |||
Macro to input formula in range based on another range | Excel Programming |