#1
|
|||
|
|||
Button & Macro Help
Hi all, newbie here. I have created a simple book for costing purposes at work, fill out each sheet that applies and the final sheet has the outcome filtered to it.
As a default I have the markup on products and materials set to 20% eg (G4*1.2) What I would really like is a series of buttons on each sheet to give the option of markup percentage eg button 1 10% (g4*1.1,H6*1.1,K28*1.1) button 2 20% (g4*1.2,H6*1.2,K28*1.2) button 3 25% (g4*1.25,H6*1.25,K28*1.25) and so on.....there are multiple cells on each sheet for these buttons to apply to. I have no idea what I am doing with code but will pick it up if someone can give me a kickstart!! Thanks in advance |
#2
|
|||
|
|||
You could do something as simple as, place three buttons on your worksheet and add three separate codes to your VBA. Assign the buttons to the codes below.
Change the Range to wherever you want the percentage. Code:
Sub Push_Button_1() Range("A1").Value = "1.1" End Sub Code:
Sub Push_Button_2() Range("A1").Value = "1.2" End Sub Code:
Sub Push_Button_3() Range("A1").Value = "1.25" End Sub |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Spell check macro within macro button field doesn't work in one document | samuelle | Word VBA | 0 | 07-20-2016 02:27 AM |
Macro button missing | namedujour | Word VBA | 0 | 08-25-2014 11:21 AM |
Deleting Macro Button | mata30s | Word VBA | 0 | 01-23-2013 12:04 PM |
How do I assign a macro to a button when the macro is in my personal workbook? | foolios | Excel Programming | 2 | 07-27-2011 02:41 PM |
Macro Button | B2W | Excel | 2 | 06-18-2010 09:36 AM |