+ Reply to Thread
Results 1 to 3 of 3

Return relative position based on combination of two cells

  1. #1
    Registered User
    Join Date
    06-13-2016
    Location
    Charlotte, NC
    MS-Off Ver
    2013
    Posts
    1

    Return relative position based on combination of two cells

    I've been learning more lately and using index, match, indirect, etc. with more success. I've struggled to find an answer for this one, although I am sure it is very easy. Here is the issue. I am trying to set a formula so that the data on the "cover sheet" tab will be populated from the "Bad Debt" tab that is in yellow. The formulas can't be hardcoded because the number of rows will change each time the report is run because customers are added or dropped off. However the "comp codes" won't change and the relative position of the totals in relation to the detail won't change.

    My thought was for example to have excel find a match for "2000COMPANY TOTAL" (in this example it is cell D26&D27) and then return the value 3 rows over and 6 down from that match in order to populate the "Specific Provision" item. Then with the same "2000COMPANY TOTAL" match populate the 3 rows over and 7 rows down for the value under "AR Current", etc. etc. Then also do the same for "3000COMPANY TOTAL". I hope you are getting the idea here. I've tried if and offset functions, but couldn't get it to check the whole column for a match.

    The idea would to be able to paste a new information in the Bad Debt tab and have it automatically populate the cover sheet.

    The file is attached, your help is much appreciated!!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-18-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    142

    Re: Return relative position based on combination of two cells

    Here is the approach I tried...using sumifs. It required a small modification to summary page (adding a row above for the allowance %). For example, in AR Current on Cover sheet for Company Code 2000, I used this formula:
    Please Login or Register  to view this content.
    , where d$1 is the .05% allowance. It adds up the totals and subtracts the credit amounts and then multiplies by your allowance amount. For the groups that have more than one column to sum from (for example, 31-90 picks up both 31-60 and 61-90) I added two sumifs together.

    Take a look at the attached to see if it makes sense.
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,983

    Re: Return relative position based on combination of two cells

    In "Cover Sheet" C5

    =IFERROR(OFFSET('Bad Debt'!$G$2,MATCH('Cover Sheet '!$A5,'Bad Debt'!$D$2:$D$200,0)+COUNTIF('Bad Debt'!$D$2:$D$200,$A5)+COLUMNS($A:C)+2,,1,1),0)

    Copy across and down

    NOTE: I changed the column A "Company Codes" to TEXT to match those in "Bad Debt")
    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. Copy contents of cells in relative position to cells in with certain value.
    By ajay1965 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-27-2015, 07:21 AM
  2. [SOLVED] Autopopulating a formula to only sum cells with specific values relative to its position.
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2013, 04:31 PM
  3. [SOLVED] Copy and paste cells of relative position ,then copy to others w'o alter
    By lokwungkwung in forum Excel General
    Replies: 14
    Last Post: 10-29-2013, 01:09 PM
  4. Return relative position of the largest number in an array
    By DanielMinh in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-20-2013, 03:01 AM
  5. Replies: 3
    Last Post: 01-18-2013, 08:44 PM
  6. Return index value position for value based on two criteria
    By jeffreybrown in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-07-2011, 08:03 PM
  7. VBA - Selecting a cell based on relative position vs cell #
    By jago_ML in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-08-2007, 03:04 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