![]() |
#1
|
|||
|
|||
![]()
Sub find_string()
Dim i As Integer i = 150 Cells(42, 6).Formula = "=IF(AND((LEFT(E150,(FIND(""-"",E150)-1)) = ""abc ""),(ISNUMBER(SEARCH(TRIM(RIGHT(E42,(LEN(E42)-FIND(""-"",E42)))), E150)))),TRUE,FALSE)" End Sub The above code works fine. But what am looking for is to use a variable i (initialized to 150) and substitute E150 in the above formula. So instead of E150, I want to use something like E[i] How can it be done? |
#2
|
|||
|
|||
![]()
Cells(42, 6).Formula = "=IF(AND((LEFT(E150,(FIND(""-"",E" & CSTR(i) & ")-1)) = ""abc ""),(ISNUMBER(SEARCH(TRIM(RIGHT(E42,(LEN(E42)-FIND(""-"",E42)))), E150)))),TRUE,FALSE)"
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel Formula Bar | powrus1 | Excel | 4 | 07-19-2016 09:19 AM |
![]() |
dmcg9760 | Excel | 3 | 05-02-2016 11:50 PM |
![]() |
dreamer1963 | Excel | 2 | 03-16-2014 03:59 AM |
Help with excel formula | GoldenSlumbers | Excel | 2 | 12-13-2012 03:32 AM |
![]() |
Shahzad | Excel | 1 | 12-07-2008 04:13 AM |