Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Changing chosen numbers globally via popup
Hi I have a small task to carry out in Excel. I need a macro that will offer popups requesting the following a. Choose a column to operate on. b. Enter a number to be found in that column. c. Enter a number to update the number chosen in b. d. Go back to start of macro at popup a , unless cancelled. So , I might choose column D , all values at 7.30 to be updated to 12.50. Can someone help with some code , please? Grateful for any assistance. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Changing chosen numbers globally via popup
In article , joel
writes try this Sub replacenumber() Do OldValue = InputBox("Enter Data to replace : ") NewValue = InputBox("Enter Replacement Data : ") Set mycell = Application.InputBox( _ prompt:="Select a Column", Type:=8) mycell.Replace what:=OldValue, replacement:=NewValue, _ lookat:=xlPart Msg = "Do you want to continue ?" ' Define message. Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons. Title = "MsgBox Demonstration" ' Define title. Help = "DEMO.HLP" ' Define Help file. Ctxt = 1000 ' Define topic ' context. ' Display message. Response = MsgBox(Msg, Style, Title, Help, Ctxt) Loop While Response = vbYes End Sub Hi Joel Thanks for your help. I couldn't get it working , I'm afraid. I think there's some scrambling in the email , and the remmed statements added confusion. I did eventually have it running without VBA error , but it didn't actually carry out the replacement as required. Best Wishes |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using a popup to affect a column of numbers | Excel Worksheet Functions | |||
Automating change via popup to a column of numbers | Excel Worksheet Functions | |||
Find terms that sum to chosen total among a column of numbers? | Excel Worksheet Functions | |||
how can I globally change minus numbers to positive ones? | Excel Discussion (Misc queries) | |||
Macro preparing numbers to be booked (columns to be chosen conditionally) | Excel Worksheet Functions |