+ Reply to Thread
Results 1 to 5 of 5

Making a Number Relative

  1. #1
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Making a Number Relative

    I have a workbook with lots of worksheets all based on a template. Depending on certain criteria a different number of rows will be automatically deleted on each worksheet to remove rows where there are no entires. The problem I have is because I'm using 'ROW()-75' as part of my formula if any rows above row 75 are automatically deleted the '75' part won't update to reflect the correct number.

    Is there any way to make the number relative so that when rows above are deleted, the value will change accordingly? This is my formula:

    Please Login or Register  to view this content.
    Many thanks
    Thanks,
    HangMan

    You can say "Thank you!" by clicking Add Reputation below the post.
    Please, mark your thread [SOLVED] if you are happy with the solution.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Making a Number Relative

    What determines the 75?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Making a Number Relative

    Quote Originally Posted by HangMan View Post
    =IFERROR(INDEX('Data'!$A:$S,MATCH($C$8&$I$69&$C$71&COUNTIF($B$75:$B75,$B75)+ROW()-75,'Data'!$S:$S,0),MATCH($C$74,'Data'!$A$2:$S$2,0)),"")
    The formula is dependent upon which row it's entered on and you haven't provided that detail.

    I'm guessing that it's entered on row 75. As you copy the formula down it increments like so:

    COUNTIF(...)+0
    COUNTIF(...)+1
    COUNTIF(...)+2
    COUNTIF(...)+3

    If that's the case...

    Replace: ROW()-75

    With: ROWS(A$1:A1)-1
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Making a Number Relative

    @ Ford

    Appologies, it was late... the formula is entered into various different rows but the row number it is entered into is the same as the number, so ROW()-75 is entered in row 75, ROW()-100 in row 100 and so on.

    @ Tony

    Perfect, that does the trick, I'd totally forgotten about ROWS()... many thanks...

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Making a Number Relative

    You're welcome. Thanks for the feedback!

+ 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. [SOLVED] Making the last part of this INDIRECT formula as relative
    By zicitron in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-04-2020, 02:26 PM
  2. Making Rows Relative in VBA
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-15-2013, 02:36 PM
  3. Replies: 7
    Last Post: 06-13-2006, 07:49 PM
  4. making cells change relative to each other, cant figure out
    By MMA in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-13-2006, 07:40 AM
  5. making cells change relative to each other? cant figure it out
    By MMA in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-13-2006, 03:15 AM
  6. making cells change relative to each other?
    By MMA in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-13-2006, 12:25 AM
  7. [SOLVED] How do I keep formats (eg.color) when making a relative reference
    By I hope you can help in forum Excel General
    Replies: 2
    Last Post: 06-22-2005, 10:05 AM
  8. [SOLVED] Making the Sheet a relative value?
    By AuMiQuinn in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-05-2005, 04:06 PM

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