+ Reply to Thread
Results 1 to 6 of 6

Offset range of cells

  1. #1
    Registered User
    Join Date
    08-01-2019
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    10

    Offset range of cells

    Hi,

    Would appreictae some info on how to offset a named range within a sumif function.

    e.g.

    I have in cells A1:A4 some words and this range has been names as test.

    In my sumif function:
    Range = 'test' (i.e. A1:A4)
    Criteria = cow (i.e. suppose A1 and A2 are 'cow')
    Sum Range = C1:C4 (I want this range to be as a function of 'test')

    How can I make it that the value of C1 and C2 are added together such that the sum range is a function of A1 and A2?

    I have this.

    =sumif(test,"cow",offset(test,2,0) --> how can this be changed?

    in essnece =sumif(a1:a4,"cow",c1:c4)

    Many thanks and appreciate any help.

  2. #2
    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,099

    Re: Offset range of cells

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please don't attach a picture of an Excel sheet (no-one will want to re-type all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually).

    4. Try to avoid using merged cells. They cause lots of problems!

    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

  3. #3
    Registered User
    Join Date
    08-01-2019
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    10

    Re: Offset range of cells

    Please view the excel file. To explain:

    In the first table, i have made a sum of of column A with a criteria and a sum range, reuslting in 136

    In the second table, I have labeled the same column as TEST, and i want my formula to perform exactly as above, but with offsetting column A by 1 row for the sum range.

    Please assist if possible in how this formula can be edited to refer to numbers in column B basis offsetting column A
    Attached Files Attached Files

  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,099

    Re: Offset range of cells

    And your expected answer is still 136????

    =SUMIF(TEST,D14,OFFSET(TEST,,1,,))

  5. #5
    Registered User
    Join Date
    08-01-2019
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    10

    Re: Offset range of cells

    You sir - are a legend.

    Appreciate your quick responses.

  6. #6
    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,099

    Re: Offset range of cells

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. sum offset of a range of cells that contain specific string
    By Jietoh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-14-2016, 09:52 AM
  2. If offset range is not blank move 3 cells right
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2014, 06:15 AM
  3. [SOLVED] select a range of cells with OFFSET
    By jazbath in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2013, 06:15 PM
  4. select a range of cells using .Offset
    By aloha31 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-06-2013, 05:26 PM
  5. .Offset, .Range and .Cells problem in VBA
    By newbi004 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-30-2013, 06:44 AM
  6. Replies: 1
    Last Post: 01-23-2013, 03:00 PM
  7. Replies: 2
    Last Post: 08-22-2005, 01:05 AM

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