+ Reply to Thread
Results 1 to 3 of 3

random number sum macro /formula

  1. #1
    Registered User
    Join Date
    03-12-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    4

    random number sum macro /formula

    Hi All,

    I am trying to do a simple calculation but not able to find the right way.

    level 1 level2 level3 level4 level5 level6 Sum
    1 1 2 3 20 6
    1 3 3 3 6 7
    1 3 3 3 1 1
    5 9 14 3 24 25
    6 10 15 20 25 25
    7 11 16 21 26 25
    8 12 17 22 27 25
    9 13 18 23 28 25
    10 14 19 24 29 25

    i have these 6 levels, All i want is the sum or sumproduct of last three columns - (Now 3 is user specified , a user can put any number between 1-6 and i should get the sum of those count).

    For example :If the user input is 3 the I should get a sum of level 6 ,level 5 and level 4 as those are the last three in the list
    File is been attached .

    NOTE:- Its possible we might get more than 6 levels sometime.
    Please help me with macros or formula to sort this.
    I tried offset condition but its giving the wrong results.

    Many Thanks
    Sam
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: random number sum macro /formula

    Try this formula in G6 copied down

    =SUM(OFFSET(F6,0,1-O$2,1,O$2))
    Audere est facere

  3. #3
    Registered User
    Join Date
    03-12-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: random number sum macro /formula

    Thank you so much for the reply daddylonglegs ,
    It was really a great help for moving forward however i am stuck with another situation here,

    Sumproduct - ii not able to get this .
    I am really new to excel and trying to bring my life into this,please help

    attached is the sample file.
    Many Thanks
    Sam
    Attached Files Attached Files

+ 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: 5
    Last Post: 06-21-2013, 10:40 AM
  2. How do I pull a random number in a word Macro?
    By pablowilks in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 06-05-2012, 06:03 PM
  3. [SOLVED] Macro Code Dumping Out Random Number
    By djfatboyfats in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-30-2012, 01:26 PM
  4. macro-random number
    By shilpz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2008, 09:31 AM
  5. [SOLVED] Random number Macro
    By Mike Rogers in forum Excel General
    Replies: 4
    Last Post: 02-24-2006, 11:30 PM

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