Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
find text in cell
Hi,
I am trying to do something like this: if(instr("ABC",A1),A1,"")) Doesn't work? If ABC is found in A1 I would like to copy A1 to B1 (leave B1 blank if not). Thanks in advance for any help you can give. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
find text in cell
Did you bother to look in the vba help index for INSTR
-- Don Guillett Microsoft MVP Excel SalesAid Software "Bonnie" wrote in message ... Hi, I am trying to do something like this: if(instr("ABC",A1),A1,"")) Doesn't work? If ABC is found in A1 I would like to copy A1 to B1 (leave B1 blank if not). Thanks in advance for any help you can give. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
find text in cell
Instr is a VBA function.
You can use =search() or =find(): =if(isnumber(search("abc",a1),a1,"") =find() is case sensitive. =search() is not. Another alternative (not case sensitive): =if(countif(a1,"*abc*")0,a1,"") Bonnie wrote: Hi, I am trying to do something like this: if(instr("ABC",A1),A1,"")) Doesn't work? If ABC is found in A1 I would like to copy A1 to B1 (leave B1 blank if not). Thanks in advance for any help you can give. -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
find text in cell
That's what I was looking for Dave. Thanks so much for your kindness in
taking the time. Bonnie "Dave Peterson" wrote: Instr is a VBA function. You can use =search() or =find(): =if(isnumber(search("abc",a1),a1,"") =find() is case sensitive. =search() is not. Another alternative (not case sensitive): =if(countif(a1,"*abc*")0,a1,"") Bonnie wrote: Hi, I am trying to do something like this: if(instr("ABC",A1),A1,"")) Doesn't work? If ABC is found in A1 I would like to copy A1 to B1 (leave B1 blank if not). Thanks in advance for any help you can give. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
FIND / SEARCH text compare cell to string in 3rd cell | Excel Discussion (Misc queries) | |||
find cell with matching text, then reference cell in same row | Excel Worksheet Functions | |||
Find text in a cell and copy text to another cell | Excel Discussion (Misc queries) | |||
find text in cell and replace it with part of the text in that ce. | Excel Discussion (Misc queries) | |||
Find text within cell then display text to left | Excel Discussion (Misc queries) |