+ Reply to Thread
Results 1 to 9 of 9

Problem in Double match with AND() with range

  1. #1
    Forum Contributor
    Join Date
    12-08-2018
    Location
    pakistan
    MS-Off Ver
    2013-365
    Posts
    500

    Problem in Double match with AND() with range

    hi all,
    can anybody tell me why this formula is not working.
    =IF(AND($C$6=Sheet1!$D$4:R4,B7=Sheet1!B7:B15),VLOOKUP(B7,Sheet1!$B$7:$F$15,3,0),"0")
    But when i use this, its working,
    =IF(AND($C$6=Sheet1!$D$4,B7=Sheet1!B7),VLOOKUP(B7,Sheet1!$B$7:$F$15,3,0),"0")
    Last edited by majidsiddique; 02-13-2019 at 07:21 AM.

  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,737

    Re: Help in formula apply

    you are using a range in the AND() that does not work
    AND($C$6=Sheet1!$D$4:R4,B7=Sheet1!B7:B15)
    why are you using a range , what are you trying to do exactly

    if you want to see if the value in C6 exists in the Range D4:R4 and B7 in B7:B15
    you would use a countif()
    that will test for the existence

    but B7 will always exist in B7:b15, As B7=B7 so TRUE
    Last edited by etaf; 02-13-2019 at 03:29 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
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Help in formula apply

    Title adapted. much better. Thank you
    Last edited by Pepe Le Mokko; 02-13-2019 at 01:06 PM.

  4. #4
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,211

    Re: formula is not working

    You will get no assistance till you comply with the request from Pepe. Formula is not working isnt really a good item to search on

  5. #5
    Forum Contributor
    Join Date
    12-08-2018
    Location
    pakistan
    MS-Off Ver
    2013-365
    Posts
    500

    Re: Help in formula apply

    Hi Pepe,
    how someone can identify poor thread, its very simple if i have a problem in formula, so i create a thread with formula problem.

  6. #6
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,211

    Re: Problem in Double match with AND() with range

    I think you have made an attempt to change the title.


    =IF(countif(Sheet1!$D$4:R4,$C$6)*countif(Sheet1!B7:B15,B7),VLOOKUP(B7,Sheet1!$B$7:$F$15,3,0),"0")

  7. #7
    Forum Contributor
    Join Date
    12-08-2018
    Location
    pakistan
    MS-Off Ver
    2013-365
    Posts
    500

    Re: Problem in Double match with AND() with range

    Hi Davsth,
    thanks to reply, your formula is working good BUT tell me one thing if change date in specific cell how we lookup pick data increase AUTO column based on cell ref. see the attached file for more clarification. kindly tell me i control this cell ref by list-box button and tell me one thing why Hlookup is not working with name range. i use sheet2 Hlookup(C5,VL,A8,False) , VL is the range of sheet1 d4 to S65.
    Thanks
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    12-08-2018
    Location
    pakistan
    MS-Off Ver
    2013-365
    Posts
    500

    Re: Problem in Double match with AND() with range

    Hi, I got it ListBox solution. Kindly tell me Hlookup Failed in name range.

  9. #9
    Forum Contributor
    Join Date
    12-08-2018
    Location
    pakistan
    MS-Off Ver
    2013-365
    Posts
    500

    Re: Problem in Double match with AND() with range

    Thanks for all respondent, i got it why H lookup failed. i tried so many time and got it.
    thanks.

+ 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] Apply VBA Script based on Text in one column and apply a formula in another column
    By vvincent in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2016, 09:19 PM
  2. apply formula in 1 col
    By henry wirianto in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 04:00 AM
  3. [SOLVED] how to acquire result of CELL formula then apply MID formula
    By dgiardina in forum Excel General
    Replies: 5
    Last Post: 01-26-2015, 03:20 PM
  4. What is the VBA language to copy formula cell and apply formula to set of cells?
    By Goldsmith in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-25-2012, 02:32 PM
  5. Replies: 9
    Last Post: 06-09-2012, 06:14 PM
  6. Replies: 1
    Last Post: 03-04-2012, 12:03 AM
  7. Formula/macro - Apply certain formula as per duplicate cells in column L
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2011, 12:28 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