Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to increase cell value by 1 each time button clicked

Hi,

does anyone know what code to include in a macro so that a given cel
in increase by 1 each time the macro is run. The macro will b
clearing all of the data fields so that the counter goes on to the nex
data entry i.e data is entered onto quote 23, macro clears all dat
fields and moves on to quote 24 and so on.

Thanks
Pet

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to increase cell value by 1 each time button clicked

' test cell a1
if isnumeric(range("a1")) then
range("a1").value=range("a1").value+1
end i

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Macro to increase cell value by 1 each time button clicked

does anyone know what code to include in a macro so that a given cell
in increase by 1 each time the macro is run.


Sub addone()'assign to a button
Range("d2") = Range("d2") + 1
End Sub

--
Don Guillett
SalesAid Software

"fozzer " wrote in message
...
Hi,

does anyone know what code to include in a macro so that a given cell
in increase by 1 each time the macro is run. The macro will be
clearing all of the data fields so that the counter goes on to the next
data entry i.e data is entered onto quote 23, macro clears all data
fields and moves on to quote 24 and so on.

Thanks
Pete


---
Message posted from
http://www.ExcelForum.com/



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
Macro button gets bigger when clicked Snowskier Excel Discussion (Misc queries) 1 May 27th 10 09:36 PM
When clicked, the Button needs to create a number in another cell Clark Excel Worksheet Functions 0 August 20th 08 11:07 PM
Change Macro button color after clicked Cong Nguyen Excel Discussion (Misc queries) 2 November 30th 07 02:55 PM
looking to create a time + text history when a button is clicked? xoxoxoxo Excel Worksheet Functions 1 November 4th 06 03:40 PM
How do I insert radio button to sum a cell when clicked Joe D. Excel Worksheet Functions 1 March 6th 06 08:54 PM


All times are GMT +1. The time now is 12:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"