Hi MrExcel,
I was wondering if someone with a little more experience could look at the following code and maybe tell me a better way of doing it (or clean it).
Explanation:
- It basically says: IF F14 = [number] then display [text/link]
- This code is located in L41.
- F14 contains the results of 25 radio buttons (1-25).
- The code looks at F14 which number is displayed (depending on which radio button was selected).
- The results in L41 can contain either specific text or a specific link.
- Links include places in the workbook (on different sheets) or external files (like an Outlook draft email)
The reason I say a clean-up is "needed", is because when plain text is displayed, the cell still sees this as a link.
For now I made a workaround for the text by letting it think its a link and link it to the same cell - If I don't make it a link, Excel takes the next link in the formula and connects it to the plain text.
I'm sure there is a better way of doing this....I tried CHOOSE, but that only copies plain text and no links.
Many thanks in advance!
Kind regards
I was wondering if someone with a little more experience could look at the following code and maybe tell me a better way of doing it (or clean it).
VBA Code:
=IF($F$14=15;HYPERLINK("#'SVN RMA'!L41";"Click here for an email template.");IF($F$14=10;HYPERLINK("#'SVN RMA'!L41";"Click here for an email template.");IF($F$14=24;HYPERLINK("#'SVN RMA'!L41";"Unknown RMA error. Please create manual RMA.");IF($F$14=17;HYPERLINK("#'SVN RMA'!L41";"Master not filled in. Please create manual RMA.");IF($F$14=8;HYPERLINK("#RCHT!W2";"Click here to go to the Help Tool!");IF($F$14=9;HYPERLINK("#RCHT!W2";"Click here to go to the Help Tool!")))))))
Explanation:
- It basically says: IF F14 = [number] then display [text/link]
- This code is located in L41.
- F14 contains the results of 25 radio buttons (1-25).
- The code looks at F14 which number is displayed (depending on which radio button was selected).
- The results in L41 can contain either specific text or a specific link.
- Links include places in the workbook (on different sheets) or external files (like an Outlook draft email)
The reason I say a clean-up is "needed", is because when plain text is displayed, the cell still sees this as a link.
For now I made a workaround for the text by letting it think its a link and link it to the same cell - If I don't make it a link, Excel takes the next link in the formula and connects it to the plain text.
I'm sure there is a better way of doing this....I tried CHOOSE, but that only copies plain text and no links.
Many thanks in advance!
Kind regards