+ Reply to Thread
Results 1 to 3 of 3

create a function

  1. #1
    Registered User
    Join Date
    10-02-2006
    Posts
    8

    create a function

    how do i create a function that allows a user to select a range of cells
    and after which, multiplying the range of cells selected?

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    Function MultiplyCells(myRange As Range)
    x = 1
    For Each Cell In myRange
    x = Cell.Value * x
    Next Cell
    MultiplyCells = x
    End Function

  3. #3
    Registered User
    Join Date
    10-02-2006
    Posts
    8
    Hey: ) thank you so much : )

    Is it possible to allow the user to have an option in choosing the output he or she wants in the function?

    For example:

    Choice A: MultiplyCells = (x-1) * 10000
    Choice B: MultiplyCells = (x-1) * 100
    Choice C: MultiplyCells = x-1

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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