Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have text data in Column A (from A1 to A300), I would like to search each
cell in column A in order to get the position number of the character * and the result in B cells, I am trying with the following code, but I have problems in coding the A column : For i=1 to 300 Cells(i,2).Formula="=Search("*","A",i,1)" Next Thanks for your help -- Moises |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
with activesheet
.range("b1:b300").formula = "=search(""~*"",a1,1)" end with The asterisk is a wildcard (represents any set of characters). So you have to tell excel that you're really looking for that character. The tilde (~) is the character that does this. ~* to find * ~? to find ? ~~ to find ~ Moises wrote: I have text data in Column A (from A1 to A300), I would like to search each cell in column A in order to get the position number of the character * and the result in B cells, I am trying with the following code, but I have problems in coding the A column : For i=1 to 300 Cells(i,2).Formula="=Search("*","A",i,1)" Next Thanks for your help -- Moises -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You may want to hide the errors if there is not asterisk:
With ActiveSheet .Range("b1:b300").Formula _ = "=IF(ISERROR(SEARCH(""~*"",A1)),"""",SEARCH(""~*"" ,A1))" End With Moises wrote: I have text data in Column A (from A1 to A300), I would like to search each cell in column A in order to get the position number of the character * and the result in B cells, I am trying with the following code, but I have problems in coding the A column : For i=1 to 300 Cells(i,2).Formula="=Search("*","A",i,1)" Next Thanks for your help -- Moises -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks again Dave.
-- Moises "Dave Peterson" wrote: You may want to hide the errors if there is not asterisk: With ActiveSheet .Range("b1:b300").Formula _ = "=IF(ISERROR(SEARCH(""~*"",A1)),"""",SEARCH(""~*"" ,A1))" End With Moises wrote: I have text data in Column A (from A1 to A300), I would like to search each cell in column A in order to get the position number of the character * and the result in B cells, I am trying with the following code, but I have problems in coding the A column : For i=1 to 300 Cells(i,2).Formula="=Search("*","A",i,1)" Next Thanks for your help -- Moises -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search Formula | Excel Worksheet Functions | |||
Help with Search Formula | Excel Worksheet Functions | |||
I need help - search formula | Excel Worksheet Functions | |||
another formula search, if any | Excel Discussion (Misc queries) | |||
Search formula | Excel Worksheet Functions |