How to Nest =MID(A1,2,LEN(A1)-2) To Eliminate Quotation Marks

blafarm

Board Regular
Joined
Oct 14, 2018
Messages
59
I am trying to remove the double quotation marks from the front and back of the result of this API call:

=IF(A1="","",IFERROR(WEBSERVICE("https://api.iextrading.com/1.0/stock/"&A1&"/quote/companyName"),""))

Where the contents of A1 are any stock symbol, like AMZN

The API call works perfectly, but I can't seem to figure out how to nest this function: =MID(A1,2,LEN(A1)-2) to eliminate the quotation marks.

I would be grateful for any guidance.

Thank you.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
I've simplified my formula to this:

=IF(A1="","",(WEBSERVICE("https://api.iextrading.com/1.0/stock/"&A1&"/quote/companyName")))

But I still cannot figure out how to nest: =MID(A1,2,LEN(A1)-2)
 
Upvote 0
Would =SUBSTITUTE((WEBSERVICE("https://api.iextrading.com/1.0/stock/"&A1&"/quote/companyName"), CHAR(34), "") do what you want?
 
Upvote 0
Thank you very much.

After a bit of experimentation, I found this works for me:

=IF(A1="","",SUBSTITUTE(WEBSERVICE("https://api.iextrading.com/1.0/stock/"&A1&"/quote/companyName"),CHAR(34),""))

I really do appreciate you taking the time to help me.

Thanks again very much !!!
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top