+ Reply to Thread
Results 1 to 7 of 7

Formula to lookup a wildcard value and return a value if true

  1. #1
    Registered User
    Join Date
    11-09-2017
    Location
    Hamilton, New Zealand
    MS-Off Ver
    2010
    Posts
    2

    Question Formula to lookup a wildcard value and return a value if true

    From a profit and loss report, I want to extract all data in the row relative to one department into another sheet - otherwise I want a blank return, in this case the department that has the suffix code .2202. What is the best way to do this please - I have tried vlookup but only know basics

    30200.2202 P - ACC Levy 886.3
    30400.9202 A - Accounting Fees 12,300.00
    30600.2202 P - Advertising 1,394.73
    30600.3202 W - Advertising 206.4
    30600.4122 S - Advertising 1,134.47
    30600.9202 A - Advertising 186.07

  2. #2
    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,926

    Re: Formula to lookup a wildcard value and return a value if true

    Hi, welcome to the forum

    What exactly did you try?
    Are those values or text?
    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

  3. #3
    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,148

    Re: Formula to lookup a wildcard value and return a value if true

    Try

    =IFERROR(INDEX(A$1:A$6,SMALL(IF(RIGHT($A$1:$A$6,4)="2202",ROW($A$1:$A$6)-ROW($A$1)+1,""),ROWS($A$1:A1))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Copy acroos and down
    Attached Files Attached Files

  4. #4
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Formula to lookup a wildcard value and return a value if true

    OR,

    Try the following array formula:

    Please Login or Register  to view this content.
    to be confirmed by pressing CTRL+ALT+ENTER

    See the attached file.
    Attached Files Attached Files

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: Formula to lookup a wildcard value and return a value if true

    Quote Originally Posted by FishCity View Post
    30200.2202 P - ACC Levy 886.3
    30400.9202 A - Accounting Fees 12,300.00
    30600.2202 P - Advertising 1,394.73
    30600.3202 W - Advertising 206.4
    30600.4122 S - Advertising 1,134.47
    30600.9202 A - Advertising 186.07
    How many columns, and which column which string is in?
    Try to post a dummy file.
    Quang PT

  6. #6
    Registered User
    Join Date
    11-09-2017
    Location
    Hamilton, New Zealand
    MS-Off Ver
    2010
    Posts
    2

    Re: Formula to lookup a wildcard value and return a value if true

    I have attached (hopefully) a generic working document that shows what I am trying to do more clearly - On sheet "412" I want to pull through all entries that have ".412" in column A - and pull through all the information in that row (So columns A through to F).

    Attachment 546968

  7. #7
    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,148

    Re: Formula to lookup a wildcard value and return a value if true

    No file attached .....

    Did you look at replies in posts #3 and #4 ?

    Attach a sample workbook (not image).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Last edited by JohnTopley; 11-10-2017 at 03:39 AM.

+ 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] IF logical test pass return with 1st LOOKUP if true, if false then return with 2nd VLOOKUP
    By powerzasty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-21-2017, 03:55 PM
  2. Find Wildcard, return that Wildcard value?
    By help_me_im_lost in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-08-2014, 01:20 PM
  3. [SOLVED] Lookup specific value in range of duplicates return if true
    By maddog9486 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-27-2013, 02:54 PM
  4. [SOLVED] formula to lookup formatting and return true false
    By paintballlovr in forum Excel General
    Replies: 2
    Last Post: 05-17-2012, 09:32 AM
  5. True or False with Wildcard
    By rickyilas in forum Excel General
    Replies: 2
    Last Post: 09-21-2010, 04:52 AM
  6. trying to lookup a value and return if true or fals
    By bretkennedy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-04-2006, 03:10 AM
  7. Can LooKUP get return value of True or False?
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2005, 07:30 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