+ Reply to Thread
Results 1 to 9 of 9

Formula to Search entire column for a specific word and copy a different cells value.

  1. #1
    Registered User
    Join Date
    08-21-2015
    Location
    calgary,canada
    MS-Off Ver
    2010
    Posts
    66

    Formula to Search entire column for a specific word and copy a different cells value.

    Hello all,

    Im trying to come up with ta formula

    formula is in cell aa6 on sheet called BOM

    i would like it to search entire column T on sheet called MATERIAL DATA to find the word GORE. when it finds that word i want it to copy the contents in column G in the same row where the word GORE was match

    then list these findings from CEllaa6 in BOM down to AA50 in same.

    thanks for your help

    mike rand

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula to Search entire column for a specific word and copy a different cells value.

    Try this in AA6:

    =IFERROR(INDEX('MATERIAL DATA'!G:G,SMALL(IF('MATERIAL DATA'!T$2:T$1000="GORE",ROW('MATERIAL DATA'!T$2:T$1000)),ROWS($1:1))),"") Ctrl Shift Enter

    Adjust the ranges to fit your data. Drag the formula down as far as needed.

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula to Search entire column for a specific word and copy a different cells value.

    The formula in post #2 assumes that there are multiple rows that have "GORE" in column T and that you want to return all of the corresponding values in column G.

  4. #4
    Registered User
    Join Date
    08-21-2015
    Location
    calgary,canada
    MS-Off Ver
    2010
    Posts
    66

    Re: Formula to Search entire column for a specific word and copy a different cells value.

    yes that assumtion is correct

    can yoiu tell me what this part of the formula does



    ROWS($1:1))),"") Ctrl Shift Enter



    thanks

    mike

  5. #5
    Registered User
    Join Date
    08-21-2015
    Location
    calgary,canada
    MS-Off Ver
    2010
    Posts
    66

    Re: Formula to Search entire column for a specific word and copy a different cells value.

    HEY falcondude,

    how do i get this fomula to show a blank cell instead of a zero

    =SUMIFS('MATERIAL DATA'!$R$5:$R$1994,'MATERIAL DATA'!$G$5:$G$1994,BOM!$Y5)

    thanks

    mike

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula to Search entire column for a specific word and copy a different cells value.

    Quote Originally Posted by mike rand View Post
    can yoiu tell me what this part of the formula does

    ROWS($1:1))),"")
    Notice that the ROWS function is in the k part of the SMALL function. ROWS($1:1) returns 1 which will return the 1st smallest number.
    As you drag the formula down, that will change to ROWS($1:2) which returns 2 and will therefore return the 2nd smallest number etc.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula to Search entire column for a specific word and copy a different cells value.

    Quote Originally Posted by mike rand View Post
    how do i get this fomula to show a blank cell instead of a zero

    =SUMIFS('MATERIAL DATA'!$R$5:$R$1994,'MATERIAL DATA'!$G$5:$G$1994,BOM!$Y5)
    Here's one option:
    =IFERROR(1/(1/SUMIFS('MATERIAL DATA'!$R$5:$R$1994,'MATERIAL DATA'!$G$5:$G$1994,BOM!$Y5)),"")

  8. #8
    Registered User
    Join Date
    08-21-2015
    Location
    calgary,canada
    MS-Off Ver
    2010
    Posts
    66

    Re: Formula to Search entire column for a specific word and copy a different cells value.

    FALCONDUDE,

    WORKS PERFECT THANKS.

    one more problem i am having i cant seem to figure it out.

    this is my formula in cell

    =IFERROR(INDEX('MATERIAL DATA'!$G$5:$G$1994,SMALL(IF('MATERIAL DATA'!$T$5:$T$1994="GORE",ROW('MATERIAL DATA'!$T$5:$T$1994)),ROWS($1:1))),"")

    i want to modify the formula and drag it down to cells in column.

    this is how i modified it

    =IFERROR(INDEX('MATERIAL DATA'!$G$5:$G$1994,SMALL(IF('MATERIAL DATA'!$T$5:$T$1994="PQ1,PQ2,PQ3,PQ4,PQ5,PQ6,PQ7,PQ8,PQ9,PQ10,PQ11",ROW('MATERIAL DATA'!$T$5:$T$1994)),ROWS($1:1))),"")

    you can see the first formula matches the word "GORE and it works perfect and does exactally what i need

    in the second formula you can see now i would like it to match multiple things and when it finds any of them in that column to do the same as the first formula
    however i am not sure if ive made ythe formula correctly because it is not doing what the firat formula done.
    the second formula works if only search for 1 thing like if i replace the word GORE with PQ1 it works perfect but i need to find all the PQ in the list and copy the data


    thanks

    mike rand
    Last edited by mike rand; 11-20-2018 at 12:56 PM.

  9. #9
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula to Search entire column for a specific word and copy a different cells value.

    Try this:

    =IFERROR(INDEX('MATERIAL DATA'!G:G,SMALL(IF((LEFT('MATERIAL DATA'!T$5:T$1994,2)="PQ")*(MID('MATERIAL DATA'!T$5:T$1994,3,2)+0<=11),ROW('MATERIAL DATA'!T$5:T$1994)),ROWS($1:1))),"") Ctrl Shift Enter

+ 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] copy cells from A2:J if specific word is in column G
    By moosmahna in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2018, 08:41 AM
  2. Replies: 0
    Last Post: 03-28-2016, 12:47 AM
  3. Search keyword in range of cells, then copy entire cell to another column
    By jreil563 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2015, 12:46 PM
  4. Alter existing formula to copy specific cells in row instead of copy entire column
    By painterartist in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-02-2014, 12:42 PM
  5. Replies: 2
    Last Post: 04-29-2014, 10:06 AM
  6. Replies: 7
    Last Post: 01-09-2013, 02:28 PM
  7. How to search for a word in a column and have entire row opaque once word is found
    By copleyr in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 09-04-2009, 07:11 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