+ Reply to Thread
Results 1 to 10 of 10

finding a set word from a number of words in a cell

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    finding a set word from a number of words in a cell

    On sheet 2 in cell C5 I need it to find it from sheet 1 referring it from the word "Drinks 1" thats in Q1 and so on along the row
    Attached Files Attached Files
    Last edited by Duckie; 02-07-2010 at 06:06 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: finding a set word from a number of words in a cell

    In R7 of Sheet1 enter formula:
    =COUNTIF(Q$7:Q7,"*"&Sheet2!$A$2&"*")
    and copy it down the column

    In S7 of Sheet1 enter formula:
    =MAX(R7:R10)
    in C5 of Sheet2 enter formula:
    =IF(COLUMNS($A$1:A$1)>Sheet1!$S$7,"",INDEX(Sheet1!$B$7:$B$10,MATCH(COLUMNS($A$1:A$1),Sheet1!$R$7:$R$10,0)))
    and copy it across the columns...

    Adjust ranges to suit.
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: finding a set word from a number of words in a cell

    HI
    I have tried it in my speadsheet when i do the first bit it comes up "update Value sheet"
    plus why does a part of the formula go to A1 which is a blank cell

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: finding a set word from a number of words in a cell

    not sure what the "update value sheet" means... have you changed the sheet names in the formula to coincide with your actual sheetnames?

    The A1 part is just used as a counter COLUMN($A$1:A$1) = 1, as you drag it it becomes COLUMNS($A$1:B$1) which equals 2 and so on....

  5. #5
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: finding a set word from a number of words in a cell

    Hi
    got it working
    I found the problem with the update value sheet
    i had a - between 2 words of the name of sheet

    but i can't get Drinks1 to come up twice when its in the Q7 cell twice
    as sometime the item can come a a few times maybe from 1 to 6 times in same cell Q7
    can someone please help me with the last bit
    Last edited by Duckie; 01-28-2010 at 03:02 AM. Reason: no relies

  6. #6
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: finding a set word from a number of words in a cell

    am still having a little trouble when the same word comes up and it doesn't pick it up
    i have now added the file again
    Attached Files Attached Files
    Last edited by Duckie; 01-30-2010 at 04:42 AM. Reason: added file again

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: finding a set word from a number of words in a cell

    Post a sample file illustrating problem at hand - ie actual vs desired results.

  8. #8
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: finding a set word from a number of words in a cell

    it's not picking up the same word twice in a cell i have added a sample
    its only picking up the word once
    Attached Files Attached Files

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: finding a set word from a number of words in a cell

    Not entirely sure I understand but perhaps...

    Sheet1!R7:
    =$R6+(SUMPRODUCT(LEN($Q6)-LEN(SUBSTITUTE($Q6,Sheet2!$A$2,"")))/LEN(Sheet2!$A$2))
    copied down to R10
    
    Sheet1!S7:
    =MAX(R7:R10)+SIGN(R10)
    (S8:S10 can be cleared)

    Then with Sheet1 adjusted per the above, in terms of results:

    Sheet2!C5:
    =IF(COLUMNS($C5:C5)>Sheet1!$S$7,"",INDEX(Sheet1!$B$7:$B$10,MATCH(COLUMNS($C5:C5)-1,Sheet1!$R$7:$R$10)))
    copied across to G5

    Is that what you wanted ?


    Pending value of Sheet2!A2 and the way in which the multiple items are listed in Col Q on Sheet1 that the SUMPRODUCT is open to error

  10. #10
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: finding a set word from a number of words in a cell

    thank you it worked

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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