6

I have excel sheet containing column with values such as

BANDHANBNK
SRF
SRTRANSFIN
L&TFH
IBULHSGFIN
FEDERALBNK
PNB
PEL
VOLTAS

I want to create hyperlink for each of this, url can be created as

https://in.tradingview.com/chart/?symbol=NSE:ACC1!

so I need to concatenate

https://in.tradingview.com/chart/?symbol=NSE: + cell value + 1!

doing this manually is too much work, is there any simpler way to do this?

one more thing is if cell value contains & or - it should be converted to underscore.

5
  • last 1 is constant or it will increase 1 by 1. Commented Jan 24, 2021 at 4:39
  • it is a constant Commented Jan 24, 2021 at 5:01
  • Then try my answer. Commented Jan 24, 2021 at 5:01
  • it worked. can you tell me how to replace & or - by _ (underscore) while creating this link Commented Jan 24, 2021 at 5:08
  • Use SUBSTITUTE() function. See my edited answer. If it solve your problem then consider accepting the answer. Commented Jan 24, 2021 at 6:37

2 Answers 2

7

Use following formula. Here simply concatenating cell value with URL then concatenate 1!. Use Hyperlink() formula to make hyperlink.

=HYPERLINK("https://in.tradingview.com/chart/?symbol=NSE:" & A1 & "1!",A1)

enter image description here

To replace & and - by underscore _ use below SUBSTITUTE() formula.

=SUBSTITUTE(SUBSTITUTE(A1,"&","_"),"-","_")

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

i have created macro to open multiple hyperlinks at same time stackoverflow.com/q/65879870/14713550 . this macro works on hyperlinks that i create such as www.google.com , but somehow it doesnt work on the hyperlinks that i create using the method you mentioned, can you tell me why this is happening
for more clearity, i have edited the question that i have mentioned above please look. @Harun24HR
1

this worked for me.

=HYPERLINK("https://in.tradingview.com/chart/?symbol=NSE:" & SUBSTITUTE(SUBSTITUTE(E2,"&","_"),"-","_") & "1!",E2)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.