Reputation: 69
String is "TABLE1[ROW1]"
Using Find and Replace the substring "TABLE1" should be replaced such that [ROW1] is retained after replacement.
Final String after replacement
INDIRECT(D1&"[ROW1]")
I am having trouble with inserting ") After [ROW1].
I have seen some samples for retaining using "^&", but no solution to this problem.
Kindly Help. Thanks.
Upvotes: 1
Views: 738
Reputation: 7918
Having cell A1 containing the string TABLE1[ROW1]
, using Excel worksheet function SUBSTITUTE as following: =SUBSTITUTE(A1,"TABLE1", "")
, then adding the word "INDIRECT(D1&" resulting in the cell A2 formula:
="INDIRECT(D1&" & """" & SUBSTITUTE(A1,"TABLE1", "") & """" & ")"
,
transforming the original string TABLE1[ROW1] into the string: INDIRECT(D1&"[ROW1]") as per your requirement.
Hope this will help. Rgds
Upvotes: 1