ExcelNovice2017
New Member
- Joined
- Nov 29, 2017
- Messages
- 17
- Office Version
- 365
- 2021
- Platform
- Windows
[TABLE="width: 500"]
<tbody>[TR]
[TD]2018
[/TD]
[TD]2019
[/TD]
[TD]2020
[/TD]
[TD]2021
[/TD]
[TD]2020
[/TD]
[/TR]
[TR]
[TD]300
[/TD]
[TD][/TD]
[TD]1200
[/TD]
[TD][/TD]
[TD]500
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]100
[/TD]
[TD][/TD]
[TD]23000
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Hello All
I'm want to add a interactive button onto my Dashboard:
I have a range of costs in columns from 2018 - 2028 example above with costs for each and some without costs, I'm looking to complete a macro for the form Button. I looking for the macro to add 10% to all costs and ignore the 0's when you press the button on the Dashboard and when you press the button again it removes the 10%, I don't have formulas in the cells and I'm using Excel 2013
This is where I have got to any help finishing it of would be great
Sub Add2Formula()
' Add 10
Selection.style="Percent"
For Each c In Selection
c.Activate
ActiveCell.FormulaR1C1 = "= " & ActiveCell.Formula & "+10"
Next c
End Sub
<tbody>[TR]
[TD]2018
[/TD]
[TD]2019
[/TD]
[TD]2020
[/TD]
[TD]2021
[/TD]
[TD]2020
[/TD]
[/TR]
[TR]
[TD]300
[/TD]
[TD][/TD]
[TD]1200
[/TD]
[TD][/TD]
[TD]500
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]100
[/TD]
[TD][/TD]
[TD]23000
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Hello All
I'm want to add a interactive button onto my Dashboard:
I have a range of costs in columns from 2018 - 2028 example above with costs for each and some without costs, I'm looking to complete a macro for the form Button. I looking for the macro to add 10% to all costs and ignore the 0's when you press the button on the Dashboard and when you press the button again it removes the 10%, I don't have formulas in the cells and I'm using Excel 2013
This is where I have got to any help finishing it of would be great
Sub Add2Formula()
' Add 10
Selection.style="Percent"
For Each c In Selection
c.Activate
ActiveCell.FormulaR1C1 = "= " & ActiveCell.Formula & "+10"
Next c
End Sub