Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 465
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 465
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a popup to affect a column of numbers Colin Hayes Excel Worksheet Functions 4 June 1st 09 08:29 PM
Automating change via popup to a column of numbers Colin Hayes Excel Worksheet Functions 0 May 28th 09 02:59 PM
Find terms that sum to chosen total among a column of numbers? lstutchman Excel Worksheet Functions 2 April 15th 08 08:59 PM
how can I globally change minus numbers to positive ones? james Excel Discussion (Misc queries) 1 March 9th 07 01:05 AM
Macro preparing numbers to be booked (columns to be chosen conditionally) markx Excel Worksheet Functions 0 May 23rd 06 03:11 PM


All times are GMT +1. The time now is 12:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"