+ Reply to Thread
Results 1 to 4 of 4

How to create a button or macro for increase the value of multiple cells?

Hybrid View

micalb How to create a button or... 01-26-2017, 01:02 PM
Alf Re: How to create a button or... 01-26-2017, 01:47 PM
micalb Re: How to create a button or... 01-26-2017, 04:44 PM
Alf Re: How to create a button or... 01-26-2017, 06:17 PM
  1. #1
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,795

    Re: How to create a button or macro for increase the value of multiple cells?

    You could try macros like this:

    Option Explicit
    
    Sub IncrVal()
    Dim cell As Range
    
    For Each cell In Range("B1:B23")
    cell.Value = cell.Value + 1
    Next
    End Sub
    
    Sub DecrVal()
    Dim cell As Range
    
    For Each cell In Range("B1:B23")
    cell.Value = cell.Value - 1
    Next
    End Sub
    Alf

  2. #2
    Registered User
    Join Date
    01-26-2017
    Location
    Netherlands
    MS-Off Ver
    14.0.7015.1000
    Posts
    12

    Re: How to create a button or macro for increase the value of multiple cells?

    It works! Thank you so much!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 01-08-2016, 11:44 PM
  2. [SOLVED] How to create a macro button to clear muliple cells on multiple worksheets
    By nje in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-03-2014, 06:06 AM
  3. Replies: 2
    Last Post: 01-08-2013, 08:22 PM
  4. How to create multiple directories from cells using a macro or VBA
    By riskmgr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2011, 10:16 AM
  5. Need to create a button that can copy cells, create a new sheet and then paste there
    By torontoguy in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-14-2009, 11:26 AM
  6. A macro to create a form button, assign a macro and name the button
    By cl361 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2008, 01:07 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1