+ Reply to Thread
Results 1 to 4 of 4

Help needed with Indirect() and code to reference another worksheet

  1. #1
    Registered User
    Join Date
    11-21-2014
    Location
    Louisville, KY
    MS-Off Ver
    2010
    Posts
    2

    Help needed with Indirect() and code to reference another worksheet

    I believe I am having difficulty with the Indirect() function and getting Excel to return what I wish. The idea is to be checking to see if all pieces of data for each client has come in for the month. If there is at least one piece that hasn't come in I want to know it, if all have come in I want to know that. Countblank will accommodate this. The formatting of this needs to remain basically the same, meaning the lookup table, the worksheet names, the vlookups to return row positions. What certainly can change is the code I am using via Indirect() if there is a better method.

    I am attempting to replicate the following which I know works correctly

    Please Login or Register  to view this content.
    This code is going to be on the worksheet many times, referencing many different columns and rows so I am trying to use a combination of INDIRECT and some Vlookups to return the correct information. I can write most of it via Indirect correctly, at least I think so.

    Please Login or Register  to view this content.
    However this currently returns #REF. I think that my issue is with the
    Please Login or Register  to view this content.
    part of the code, and for the life of me I can't figure out how to get that to work. I could also be using incorrect parenthesis. The formula correctly looks like this if I F9 pieces of it:

    Please Login or Register  to view this content.
    It looks like it is correctly evaluating the two snippets. Any ideas how I can get this to return the correct code referenced above.

    Thanks so much!
    Attached Files Attached Files
    Last edited by MyNameIsNovice; 11-21-2014 at 05:07 PM. Reason: Solved

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Help needed with Indirect() and code to reference another worksheet

    ________ _________

  3. #3
    Registered User
    Join Date
    11-21-2014
    Location
    Louisville, KY
    MS-Off Ver
    2010
    Posts
    2

    Re: Help needed with Indirect() and code to reference another worksheet

    tim201110 - wow, thanks. So easy!

  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
    52,945

    Re: Help needed with Indirect() and code to reference another worksheet

    Not totally sure what you are doing, but I think your pproblem is coming from the merged cells in Data Loads Column A

    In plain english, what exactly are you trying to do?

    If you can use a helper column to overcome the merged cells, you could use this approach...

    I used H, put this in H3, copied down...
    =IF(A3="",H2,A3)

    Then use this whefre you want the answers...
    =COUNTIFS('Data Loads'!$H$3:$H$8,Forumla!$A3,'Data Loads'!$G$3:$G$8,"")

    edit: Tim, your formula produces error when copied down?
    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

+ 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. Reference MATCH() or INDIRECT() from another worksheet?
    By criticalityevent in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2013, 05:18 PM
  2. VBA Code: Assistance on Indirect reference
    By vidyuthrajesh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-29-2012, 09:50 PM
  3. INDIRECT function to reference worksheet
    By mckaymmc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2011, 11:37 PM
  4. Indirect reference to changing worksheet name
    By Peanuts890 in forum Excel General
    Replies: 2
    Last Post: 05-21-2010, 09:52 AM
  5. SUM and INDIRECT to reference worksheet
    By Potatosalad2 in forum Excel General
    Replies: 2
    Last Post: 02-28-2006, 10:15 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