Simple Excel Macro

fedas18

Board Regular
Joined
Jan 21, 2010
Messages
81
Hi,

I am trying write a simple macro that is driving me crazy.

When I run the macro, I want cell k3 to be turned to "1".

Then I want to run another macro where I change k3 to "0".

I don't know if its possible to do this in the same macro. Like if you double click it or something. But having two bottons wouldn't even be a big deal.

I just need 1 macro that changes k3 to 1 and another that changes it to 0.

Thanks!
 
Anyone have any other suggestions? Just looking for a simple macro that changes cell K3 to 1

Did you right-click the sheet's tab and select View Code as Peter said? This is worksheet event code, so it needs to go in the appropriate sheet's module.
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,224,605
Messages
6,179,860
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top