Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When a user selects multiple cells in excel, and runs the macro, I need
an input box to appear requesting a number. That number is then the percent amount that I want to times the cell by. E.G A1 = 1 A2 = 2 Inputbox = 7 A1 = 0.07 A2 = 0.14 Any assistance in this would be greatly appreciated... Thanks --- Message posted from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try This.
It gives additional option of selecting the range you want to increase/decrease with the second input box Sub Macro6() Dim myPercent Dim myRange As Range myPercent = InputBox("Enter Percentage Increase, ie 25, 35 ") If myPercent < 1 Then myPercent = myPercent * 100 myPercent = myPercent / 100 Set myRange = Application.InputBox("Select target cells to adjust", Type:=8) For x = 1 To myRange.Cells.Count myRange.Cells(x) = myRange.Cells(x) * myPercent Next x End Sub "Fusto" wrote in message ... When a user selects multiple cells in excel, and runs the macro, I need an input box to appear requesting a number. That number is then the percent amount that I want to times the cell by. E.G A1 = 1 A2 = 2 Inputbox = 7 A1 = 0.07 A2 = 0.14 Any assistance in this would be greatly appreciated... Thanks --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto adding a macro when Excel 2003 opens | Excel Discussion (Misc queries) | |||
Global Macro Adding rows or colums to many Excel files at the same | Excel Discussion (Misc queries) | |||
Formatting a number to look like a Percent without a percent sign | Excel Discussion (Misc queries) | |||
How do I get a percent in excel. ex 24 out of 32 | Excel Discussion (Misc queries) | |||
Customising Macro Buttons, Adding an image in excel | New Users to Excel |