+ Reply to Thread
Results 1 to 6 of 6

offset alternative that a list of cells can be selected not a range.

  1. #1
    Registered User
    Join Date
    08-20-2018
    Location
    Wirral, England
    MS-Off Ver
    2019
    Posts
    15

    Question offset alternative that a list of cells can be selected not a range.

    I have the following formula below that work well if the range of cell in the height and width are concurrent in the case of the formula below one row height and three columns width (eg A1:A3)

    SUM(OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),-7,0,1,3))

    But what if instead of a continues row you can select cells along that row as in A1+A4+A6 ? Is ther a function to do this? I have searched numerous help sites including this one but cannot find the correct function, I don't believe this is possible with offset.

    Many thanks in advance.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: offset alternative that a list of cells can be selected not a range.

    What is the rule for determining which cells you want to refer to? There is probably a way to do it but you just gave us an example of three random cells.

    Also, why are you using INDIRECT in this formula to generate a cell reference rather than just using the cell reference directly?

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    08-20-2018
    Location
    Wirral, England
    MS-Off Ver
    2019
    Posts
    15

    Re: offset alternative that a list of cells can be selected not a range.

    Hi Jeff,

    The string above is taken from part of the whole function, it aim is to add up two cell and see if they are greater than 0 if not it will then do a sum. This formula is being applied to a calendar 12mth and 3years, it works great over the first year as up to month 12 it will look back to month 10 and 11. But at the end of the year are totals with text in two columns before year two starts so in the first month it looks back at the last two columns with text in , I know it looks counter productive and why would I not use the cell refs but there are other reasons why that will take to long to go into.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,058

    Re: offset alternative that a list of cells can be selected not a range.

    Can you post a small sample sheet? I can't visualise what you want from your description.


    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: offset alternative that a list of cells can be selected not a range.

    I am still not seeing the rule for determining which cells you want to refer to. I cannot envision what your data looks like from your description. Can you attach a file with sample data, point out where your formula is, and explain what result you would expect?

  6. #6
    Registered User
    Join Date
    08-20-2018
    Location
    Wirral, England
    MS-Off Ver
    2019
    Posts
    15

    Re: offset alternative that a list of cells can be selected not a range.

    Thanks to every one that replied, I realised I was making it a lot more complicated than it needed to be and I used direct cell refs.

+ 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. Offset selection based on selected cells not just activecell
    By sabin348 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2015, 12:20 PM
  2. Search range for a list of strings, show userform and replace selected cells.
    By banaanas in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2015, 01:04 AM
  3. [SOLVED] SpeedUp/Alternative to Offset.Value = Offset.Value
    By Jovica in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-13-2013, 01:43 AM
  4. Select a Range of Cells Offset from a Selected Merged cell
    By kelvomatic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-07-2013, 05:52 PM
  5. Offset from multiple selected cells
    By JP Romano in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-06-2011, 04:55 PM
  6. Replies: 1
    Last Post: 06-05-2006, 03:55 PM
  7. Replies: 2
    Last Post: 08-22-2005, 01:05 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