+ Reply to Thread
Results 1 to 4 of 4

Specify exact text in an if statement

  1. #1
    Registered User
    Join Date
    08-02-2022
    Location
    Queens NY
    MS-Off Ver
    2019
    Posts
    2

    Specify exact text in an if statement

    Essentially I have workbook1 where I need to return the HOURLY rate of a client based on their ID (ID is in workbook1, Rate is in workbook2).

    The formula I have is

    =if('Workbook2'!$G$2="HOURLY",vlookup(A19,'Workbook2'!$A:$I,9,0)) *the 9 as column index is the rate*

    The formula works fine until it hits any cell with another word ex: "OT HOURLY"

    Basically my question is how do I get the formula to skip other cells and populate the desired cell with the next available "HOURLY" value?
    Thank you so much!
    Attached Files Attached Files
    Last edited by jt_mano; 08-02-2022 at 02:54 PM. Reason: Correction

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Specify exact text in an if statement

    No it doesn't...

    It'll return FALSE if it's hourly rate, or with a minor alteration, a blank.

    =IF(Workbook2!G2="HOURLY",VLOOKUP(A19,Workbook2!$A:$I,9,0),"")
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    08-02-2022
    Location
    Queens NY
    MS-Off Ver
    2019
    Posts
    2

    Re: Specify exact text in an if statement

    Thanks Glenn. Attached to the OP is a proper example of my problem. Thank you for pointing this out.
    Last edited by jt_mano; 08-02-2022 at 02:52 PM. Reason: Clarification

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Specify exact text in an if statement

    Try

    in B4 and copy down

    =INDEX('wb2'!$C$20:$C$26,AGGREGATE(15,6,(ROW($C$20:$C$26)-ROW($C$20)+1)/('wb2'!$A$20:$A$26='wb1'!$A4)/EXACT('wb2'!$B$20:$B$26,"HOURLY"),1))
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Replies: 5
    Last Post: 03-28-2018, 03:53 PM
  2. [SOLVED] Find exact text in exact cell but on any sheet?
    By nobodyukno in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2017, 02:59 PM
  3. [SOLVED] how to use an IF statement with an EXACT statement
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-08-2016, 12:54 PM
  4. [SOLVED] function IF to return text based if text contains exact text
    By in nomine noctis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2013, 06:25 AM
  5. [SOLVED] Search Exact Text Only
    By skywlker32 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2013, 09:01 AM
  6. Replies: 4
    Last Post: 04-02-2012, 07:37 AM
  7. Vlookup where text not exact
    By Janicej in forum Excel General
    Replies: 2
    Last Post: 08-19-2006, 04:00 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