Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Afternoon all,
I'm looking to reference a cell and return a specific value if it contains a certain text string / strings. Does anyone know of a way of doing this. The Text string is not always at the begining or end of the field so left and right are unusable Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Something like this:
=IF(ISNUMBER(SEARCH("MyWord",A1)),"Text found","Text not found") or this, if you need case-sensitive =IF(ISNUMBER(FIND("MyWord",A1)),"Text found","Text not found") Note, if looking for multiple strings, use the AND function. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Hawksby" wrote: Afternoon all, I'm looking to reference a cell and return a specific value if it contains a certain text string / strings. Does anyone know of a way of doing this. The Text string is not always at the begining or end of the field so left and right are unusable Thanks in advance |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Brilliant thank you Luke, you don't know how i can do this with 11 searches
do you? Obviously nested if statements don't work after 7. I should have mentioned that 1st i think "Luke M" wrote: Something like this: =IF(ISNUMBER(SEARCH("MyWord",A1)),"Text found","Text not found") or this, if you need case-sensitive =IF(ISNUMBER(FIND("MyWord",A1)),"Text found","Text not found") Note, if looking for multiple strings, use the AND function. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Hawksby" wrote: Afternoon all, I'm looking to reference a cell and return a specific value if it contains a certain text string / strings. Does anyone know of a way of doing this. The Text string is not always at the begining or end of the field so left and right are unusable Thanks in advance |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Presuming the cell you are checking is A2, and B2:B10 contain a list of words
that you want to search for: =IF(SUMPRODUCT(--(ISNUMBER(SEARCH(B2:B10,A2)))),"Text found","Text not found") -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Hawksby" wrote: Brilliant thank you Luke, you don't know how i can do this with 11 searches do you? Obviously nested if statements don't work after 7. I should have mentioned that 1st i think "Luke M" wrote: Something like this: =IF(ISNUMBER(SEARCH("MyWord",A1)),"Text found","Text not found") or this, if you need case-sensitive =IF(ISNUMBER(FIND("MyWord",A1)),"Text found","Text not found") Note, if looking for multiple strings, use the AND function. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Hawksby" wrote: Afternoon all, I'm looking to reference a cell and return a specific value if it contains a certain text string / strings. Does anyone know of a way of doing this. The Text string is not always at the begining or end of the field so left and right are unusable Thanks in advance |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
.. how i can do this with 11 searches
Assume the 11 text/items to be searched is housed in E2:E12 Assume the data is running in A2 down In B2: =IF(SUMPRODUCT(--ISNUMBER(SEARCH(A2,$E$2:$E$12)))0,"Yes","No") Copy down -- Max Singapore http://savefile.com/projects/236895 Downloads:27,000 Files:200 Subscribers:70 xdemechanik --- |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sorry guys i think i'm confusing eveyone here.
Ok i have a list of data in Cells A1:A1000. In Cells B1:11 i have a list of words. What i need to do is say if A1 contains B1 then return Monday if A1 contains B2 then Tuesday.......all the way to A1 contains B11 then return Sunday Sorry for the confusion earlier "Max" wrote: .. how i can do this with 11 searches Assume the 11 text/items to be searched is housed in E2:E12 Assume the data is running in A2 down In B2: =IF(SUMPRODUCT(--ISNUMBER(SEARCH(A2,$E$2:$E$12)))0,"Yes","No") Copy down -- Max Singapore http://savefile.com/projects/236895 Downloads:27,000 Files:200 Subscribers:70 xdemechanik --- |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try in C1, normal ENTER:
=INDEX($B$1:$B$11,MATCH(TRUE,INDEX(ISNUMBER(SEARCH ($B$1:$B$11,A1)),),0)) Copy down -- Max Singapore http://savefile.com/projects/236895 Downloads:27,000 Files:200 Subscribers:70 xdemechanik --- "Hawksby" wrote: Ok i have a list of data in Cells A1:A1000. In Cells B1:11 i have a list of words. What i need to do is say if A1 contains B1 then return Monday if A1 contains B2 then Tuesday.......all the way to A1 contains B11 then return Sunday |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hmm. While I'm not sure how you have 11 cells containing Monday through
Sunday (7 days in week?), here's an modified setup. Using your setup, and expanding to ahving the values you want (days of week?) in range C1:C11 This array** formula: =INDEX($C$1:$C$11,MAX(IF(ISNUMBER(SEARCH($B$1:$B$1 1,A1)),ROW($C$1:$C$11)))) **Confirm formula by holding down Ctrl+Shift, and then pressing Enter. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Hawksby" wrote: Sorry guys i think i'm confusing eveyone here. Ok i have a list of data in Cells A1:A1000. In Cells B1:11 i have a list of words. What i need to do is say if A1 contains B1 then return Monday if A1 contains B2 then Tuesday.......all the way to A1 contains B11 then return Sunday Sorry for the confusion earlier "Max" wrote: .. how i can do this with 11 searches Assume the 11 text/items to be searched is housed in E2:E12 Assume the data is running in A2 down In B2: =IF(SUMPRODUCT(--ISNUMBER(SEARCH(A2,$E$2:$E$12)))0,"Yes","No") Copy down -- Max Singapore http://savefile.com/projects/236895 Downloads:27,000 Files:200 Subscribers:70 xdemechanik --- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula for multiple cells if they say a certain thing | Excel Worksheet Functions | |||
Oh, just one more thing | Excel Discussion (Misc queries) | |||
get pivot data formula - is it the thing to do | Excel Worksheet Functions | |||
Is there such a thing... | Excel Discussion (Misc queries) | |||
one more thing | Excel Worksheet Functions |