+ Reply to Thread
Results 1 to 6 of 6

Is it possible to exclude certain cells from DGET Criteria Range?

  1. #1
    Registered User
    Join Date
    08-07-2019
    Location
    India
    MS-Off Ver
    2007
    Posts
    21

    Is it possible to exclude certain cells from DGET Criteria Range?

    I use DGET Function to lookup some values and get the corresponding values from an excel table. The criteria range in D2 is C1:C2, in D3 it is C1:C3, in D4 it is C1:C4 and so on.

    I want only the first cell and the last cell in the criteria range. Eg: C1 and C4 only in C1:C4. Is that possible?

    I tried with (C1:C4)-(C2:C3), but it doesn't work.
    Attached Files Attached Files
    Last edited by ajeshkdy; 08-08-2019 at 03:25 PM.

  2. #2
    Forum Contributor shivya's Avatar
    Join Date
    08-19-2017
    Location
    Delhi, India
    MS-Off Ver
    2013
    Posts
    240

    Re: Is it possible to exclude certain cells from DGET Criteria Range?

    Use If Condition.
    Please attach a worksheet with sample data and expected Result.
    To attach worksheet Go advanced -> Manage attachments -> Choose file -> Upload
    Don't forget to Mention your desired result in the sheet..
    There should be sample data only, a lot of data creates confusion.

    Thanks & Regards

    Shivya

    http://excelvbatipsforbeginners.blogspot.in/

  3. #3
    Registered User
    Join Date
    08-07-2019
    Location
    India
    MS-Off Ver
    2007
    Posts
    21

    Re: Is it possible to exclude certain cells from DGET Criteria Range?

    Hi,

    I have attached a sample file. Please check it.

    Thanks.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Is it possible to exclude certain cells from DGET Criteria Range?

    Try pasting the following formula into cell D2 on the Key D sheet:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    After pasting drag the fill handle down to D8.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    08-07-2019
    Location
    India
    MS-Off Ver
    2007
    Posts
    21

    Re: Is it possible to exclude certain cells from DGET Criteria Range?

    Actually I was able to reach to this code after a long google search and some tweaks as I didn't get the code from here. However, I appreciate your effort. As this code works, I am changing the status of the thread to solved.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Is it possible to exclude certain cells from DGET Criteria Range?

    Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. How to exclude certain cells from a range?
    By Ed in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2020, 03:28 AM
  2. Exclude certain cells from min calculation if criteria not met
    By per11 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-13-2016, 09:08 PM
  3. [SOLVED] COUNTIFS forumulas that can exclude criteria in a range
    By jholiday78 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-05-2015, 12:00 PM
  4. [SOLVED] =sum(countifs(range,{not this, not this, nor this} -How to exclude criteria in this manner
    By nscarritt in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-26-2014, 04:00 PM
  5. Replies: 3
    Last Post: 04-01-2012, 05:37 AM
  6. exclude cells with certain criteria
    By Bram in forum Excel General
    Replies: 2
    Last Post: 10-10-2005, 02:05 PM
  7. Replies: 2
    Last Post: 09-24-2005, 08:05 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