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

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
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,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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