+ Reply to Thread
Results 1 to 6 of 6

Copying value in A1 based on partial text in H1

  1. #1
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Copying value in A1 based on partial text in H1

    Hi everyone,

    I'm trying to copy the value in cell A2 into a new sheet based on specific partial text in H2. Here's my formula so far:

    =IF(FIND("XXX&",'CORE Data Quarter'!H2)<>0,'CORE Data Quarter'!A2,"")

    So I want the value of cell A2 to show up in my worksheet if cell H2 has partial text XXX in it. Any ideas?

    Thanks everyone!!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: Copying value in A1 based on partial text in H1

    Try this:

    =IF(ISERROR(FIND("XXX",H2,1)>0),"",FIND("XXX",H2,1))
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Copying value in A1 based on partial text in H1

    Hi Alan,

    Thanks for getting back to me. I had to make a few adjustments to your formula to the following:

    =IF(ISERROR(FIND("XXX&",'CORE Data Quarter'!H2,1)>0),"",FIND("XXX&",'CORE Data Quarter'!A2,1))

    But it didn't provide any results. Just to reiterate, H2 has partial text XXX. If that cell has partial text XXX i would like the data in A2 to be copied. Any ideas?

    Thanks!!

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Copying value in A1 based on partial text in H1

    hi Groovicles. few questions:
    1. are you looking for "XXX" or "XXX&"? the latter is what you put in your formula
    2. is lower case acceptable? "xxx"? FIND is case sensitive. if you don't mind upper/lower case, use SEARCH
    3. if "XXX" cannot be found, your formula will immediately hit an error. so you have to use ISNUMBER to wrap around FIND or use COUNTIF with wildcards

    so maybe:
    =IF(ISNUMBER(FIND("XXX&",'CORE Data Quarter'!H2)),'CORE Data Quarter'!A2,"")
    or:
    =IF(COUNTIF('CORE Data Quarter'!H2,"*XXX&*"),'CORE Data Quarter'!A2,"")

    adjust the formula accordingly based on my questions. you can remove "&", use SEARCH

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Copying value in A1 based on partial text in H1

    Nevermind Ben, got it working thanks to your formula and a little tweak. You're awesome!!

    Hi Ben,

    Thanks for your reply. To answer you questions:

    1. XXX is part of the text string in the cell. The full string would look something like XXX123, XXX345, XXX456. Not all cells in column H have an XXX entry, so I'm just looking for column A data to be copied if there is any XXX data in column H cells.
    2. All data is upper case

    I tried both your formulas and get blank results (not error, just blank). Thoughts?

    Thanks!
    Last edited by Groovicles; 11-01-2013 at 11:59 AM.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: Copying value in A1 based on partial text in H1

    Suggest you upload a sample spreadsheet for analysis.

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. 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 demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

+ 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] Conditional formating based on text in 2 columns (but only partial text!)
    By Icehockey44 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-19-2012, 06:26 AM
  2. Return Value Based On Partial Text String
    By JonnyBoy333 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-12-2011, 09:29 AM
  3. Text Matching based on partial text
    By LKluger in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2011, 04:04 PM
  4. remove duplicates based on partial text match
    By smelkin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-16-2011, 09:45 AM
  5. Copying row based on partial cell match and paste into existing worksheets
    By colinh69 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2011, 02:42 PM

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