Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 465
Default Automating change via popup to a column of numbers



Hi All

Don Guillett kindly made some code to change the content of a column of
numbers :


Sub Add_Subtract_Multiply_Divide_Selected_Column()

Selection.NumberFormat = "0.00"
Dim mc, lr As Long
Dim row1value, dowhat, x As String
mc = ActiveCell.Column
lr = Cells(Rows.Count, mc).End(xlUp).Row
If lr = 1 Then Exit Sub
'row1value = Cells(1, mc)
'Cells(1, mc) = InputBox("Vary Number By How Much?")
dowhat = InputBox("A to Add, D to Divide, M to Multiply, S to Subtract",
"Price Variation")
Select Case UCase(dowhat)
Case "A": x = xlAdd
Case "D": x = xlDivide
Case "M": x = xlMultiply
Case "S": x = xlSubtract
Case Else
MsgBox "Not a choice - Please Try Again."
Exit Sub
End Select
row1value = Cells(1, mc)
Cells(1, mc) = InputBox("Vary Number By How Much?", "Price Variation")
Cells(1, mc).Copy
Range(Cells(2, mc), Cells(lr, mc)).PasteSpecial _
Paste:=xlPasteAll, Operation:=x
Application.CutCopyMode = False
Cells(1, mc) = row1value

Selection.NumberFormat = "0.00"
'
End Sub



I need this to have a popup to request a value below which the
calculation will not go.

For example , having entered the operator into the first popups , I need
an extra one asking me for a lower limit. If I entered say 3.50 into
this popup then the calculation would not later below this number.

Example - before

3
3.5
4
4.5
5
5.5
6
6.5

Popup to subtract 2.5 , but with a lower limit of 3

After

3
3
3
3
3
3
3.5
4


Gratfeul fo any assistance.



Best Wishes


Colin
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
Automating to autofill column B based on column A entry GirlFridayCA Excel Discussion (Misc queries) 2 December 2nd 08 10:46 PM
Excel, change column of negative numbers to positive numbers? Nita New Users to Excel 3 November 27th 07 04:54 AM
Can I change a column of calculated numbers to absolute numbers? Kate Bissell Excel Discussion (Misc queries) 3 October 25th 06 06:10 PM
How can I change column numbers back to column letters? Space Elf Excel Worksheet Functions 3 March 2nd 06 09:35 PM
Automating adding up a column Nicki King Excel Worksheet Functions 2 January 25th 06 03:32 PM


All times are GMT +1. The time now is 10:58 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"