Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: How to make Dynamic range (width) with OFFset function

  1. #1
    Member
    Join Date
    Aug 2011
    Posts
    92
    Rep Power
    13

    How to make Dynamic range (width) with OFFset function

    Hi,

    In the attached sheet i need to sum the daily sales record for indivusal sales person. Is there a way to make the dynamic width (single row) using Offset function of any other formula so that it only sum the data till the last non blank cell.

    Dynamic Width.xlsx

    Thanks
    Rajesh

  2. #2
    Member Charles's Avatar
    Join Date
    Aug 2012
    Posts
    63
    Rep Power
    12
    Last edited by DocAElstein; 10-24-2023 at 02:57 PM.

  3. #3
    Member
    Join Date
    Aug 2011
    Posts
    92
    Rep Power
    13
    Thanks, Charles.
    A code will also work for me.

  4. #4
    Member Charles's Avatar
    Join Date
    Aug 2012
    Posts
    63
    Rep Power
    12
    Hi,

    In this copy I did not use a formula for the worksheet.
    I set the code to provide the Value of each Total.
    I have a "Interface " sheet with a Button. When you click it the code will run.
    You can the select the sheet to check the result.
    Attached Files Attached Files

  5. #5
    Member Rajan_Verma's Avatar
    Join Date
    Sep 2011
    Posts
    81
    Rep Power
    13
    Two solution are here for you
    if you filled the cell continously ,
    =SUM(OFFSET(Sheet1!C2,,,1,COUNT(Sheet1!C2:T2)))

    if you fill the cells not continously
    =SUM(C2:INDEX(C2:T2,1,MATCH(999999999,C2:T2,1)))

    Rajan

  6. #6
    Member
    Join Date
    Aug 2011
    Posts
    92
    Rep Power
    13
    Thanks Rajan and Charles, both the solutions are working perfect.

    Thanks
    Rajesh

  7. #7
    Member Charles's Avatar
    Join Date
    Aug 2012
    Posts
    63
    Rep Power
    12
    Thanks for letting us know.

  8. #8
    Member
    Join Date
    Aug 2011
    Posts
    92
    Rep Power
    13
    Hi Charles,

    Can I use a formula instead Application function.

    Thanks
    Rajesh

  9. #9
    Member Charles's Avatar
    Join Date
    Aug 2012
    Posts
    63
    Rep Power
    12
    HI,

    What do you mean?
    Can I use a formula instead Application function
    Are you anting to use the "Formula" in the vba code?
    Or in the worksheet

  10. #10
    Member
    Join Date
    Aug 2011
    Posts
    92
    Rep Power
    13
    Thanks for your reply.
    if possible In the VB code , else in the worksheet will also work.

Similar Threads

  1. Replies: 2
    Last Post: 05-13-2013, 12:03 AM
  2. How To Make A Custom VBA Function Available In All Workbooks
    By Safal Shrestha in forum Excel Help
    Replies: 2
    Last Post: 04-11-2013, 02:01 PM
  3. Offset based on Values in Column E
    By mrmmickle1 in forum Excel Help
    Replies: 7
    Last Post: 12-04-2012, 10:06 AM
  4. Dynamic Chart Query
    By leopaulc in forum Excel Help
    Replies: 6
    Last Post: 11-26-2012, 04:50 PM
  5. Replies: 2
    Last Post: 11-08-2011, 08:52 AM

Posting Permissions

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