+ Reply to Thread
Results 1 to 5 of 5

Deleting rows causes formula to change

Hybrid View

  1. #1
    Registered User
    Join Date
    02-18-2008
    Posts
    23

    Deleting rows causes formula to change

    In my spreadsheet I have the following formula:

    =IF(ISBLANK(Z4),"",IFERROR((VLOOKUP(Z4,'New Assessments'!$B$2:$U$227,10,FALSE)),X4))

    I keep adding and deleting rows to the New Assessments sheet.
    When I delete lines, the part of the formula $U$227 decreases, but when I paste new lines, this number does not increase.
    Therefore my vlookup is only checking part of the range I need to check.

    How can I fix the formula so that the $U$999 stays the same no matter what I do to the New Assessments sheet?

    Regards,

    Julio

  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
    53,048

    Re: Deleting rows causes formula to change

    have you considered using a named range? that should take care of the bottom row stays "fixed"

    alternatively, play around wit the indirect() function to make sure the cell reference doesnt change
    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
    Registered User
    Join Date
    02-18-2008
    Posts
    23

    Re: Deleting rows causes formula to change

    I am not very familiar with named ranges, and when I tried in the past could not get them to work.

    How do I use the indirect () function?

  4. #4
    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
    53,048

    Re: Deleting rows causes formula to change

    for a named range, highlight the range you are dealing with, right click and select "name a range"

    the indirect() function is hard to explain without seeing your data, but it basically uses a "text" reference, which it then converts to a cell reference.

    if you can upload a sample of ypur file, i can help you get started

  5. #5
    Registered User
    Join Date
    02-18-2008
    Posts
    23

    Re: Deleting rows causes formula to change

    I found an inelegant workaround. I simply add some blank lines to the last but one row at the end of the range and the formula changes to accomodate.
    Last edited by jgupte; 08-20-2012 at 08:43 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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