+ Reply to Thread
Results 1 to 4 of 4

Change in Lookup to different sheet not working

  1. #1
    Registered User
    Join Date
    09-20-2018
    Location
    Bradford
    MS-Off Ver
    2010
    Posts
    15

    Lightbulb Change in Lookup to different sheet not working

    Hi Guys,

    me again, so I'm trying to create a comparison of the old vs new rates.

    All jobs are input into the Input Table from Columns J-W

    The Old rates pull through on the Cost Calculation tab from the Cost Model tab
    eg. a 3SL6 with an A1 rate should be 393.93 assuming there's a 1 in Column J-W (Cell J6)

    I want the new rates to pull through on the Value Output Tab from the Rates tab.
    eg. a 3SL6 with an A1 rate should bow be 173.61.
    eg. a 3ML1 with an A2 rate should be 796.165 (Cell K13)

    I though it would be a simple change to the named range but everytime I change Costtemplate to the new ratestemplate it's coming back as A #NA


    =IF($B6="","",IF(VLOOKUP($B6&"-"&ROW(),inputtemplate,MATCH(J$3,'Input Template'!$J$3:$W$3,0)+9,FALSE)>0,VLOOKUP($E6,costtemplate,MATCH(J$3,'Cost Model'!$E$1:$CN$1,0)+2,FALSE),""))


    =IF($B6="","",IF(VLOOKUP($B6&"-"&ROW(),inputtemplate,MATCH(J$3,'Input Template'!$J$3:$W$3,0)+9,FALSE)>0,VLOOKUP($E6,ratestemplate,MATCH(J$3,Rates!$E$1:$CN$1,0)+2,FALSE),""))

    Can someone tell me what I've done wrong?
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,749

    Re: Change in Lookup to different sheet not working

    looking at the name ranges
    the costtemplate one thats looking at the costmodel for the full workbook scope
    range
    ='Cost Model'!$C$3:$CS$500
    ratestemplate
    =Rates!$A$1:$CS$203

    so change rates template to
    =Rates!$C$1:$CS$203

    that fixes it

    You have a few duplicated nameranges, with different scope
    for example
    costtemplate for example has 2 entries costmodel - one scope applies to the workbook, anysheet
    and the other only apples to the RATES sheet scope RATES

    have a read here for Named Ranges and Scope
    https://exceljet.net/named-ranges#:~...y%20exist%20on.
    and here
    https://www.fm-magazine.com/news/201...201920560.html

    Just incase you use the same name and get different results - because the global worksheet scope is different to the specific worksheet

    for example
    costtemplate - Worksheet scope referes to
    ='Cost Model'!$C$3:$CS$500
    BUT
    costtemplate - RATES scope referes to
    =Rates!$C$3:$CS$500
    so a different sheet name - when used on the RATES Sheet
    Attached Files Attached Files
    Last edited by etaf; 05-23-2022 at 04:07 AM.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    09-20-2018
    Location
    Bradford
    MS-Off Ver
    2010
    Posts
    15

    Re: Change in Lookup to different sheet not working

    Hello!


    That's what I did! but still showing as #N/A on my sheet so created a new names range and worked thank you so much!

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,749

    Re: Change in Lookup to different sheet not working

    you are welcome, thanks for the feedback and glad you managed to sort out

+ 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] Lookup values on another sheet and change background color on current sheet
    By x65140 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-20-2019, 08:15 AM
  2. [SOLVED] Sheet Change Event stops working
    By bdouglas1011 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-17-2017, 11:22 PM
  3. How to make Time Not Change when working with sheet
    By drivers-link in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-29-2014, 11:12 PM
  4. Can i get vlookup to change which sheet it is working from
    By TomTom21 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-16-2013, 09:01 PM
  5. VBA to change Sheet Name based on lookup from cell value.
    By jhall488 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-30-2012, 05:21 PM
  6. macro not working on sheet change
    By David777 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-12-2011, 03:40 PM
  7. Excel 2007 : Lookup list needs to change with new sheet.
    By graeme27uk in forum Excel General
    Replies: 8
    Last Post: 09-11-2011, 02:16 PM

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