Welcome - thanks for stating your overall goal:
I´ve got a spreadsheet with several companies’ names and I´ll need to find their companies’ number.
If you’re having trouble with code and want to stay in the spreadsheet you could download the bulk Companies House data files and process those to get company names from numbers.
Alternatively, search this forum, you’ll find other people wanting to accomplish the same goal e.g. on this thread:
I believe there are some spreadsheet-based tools / plugins for Companies House. I don’t have details though, sorry - try search.
If neither of those approaches helps, you’ll need to explain the detail. So that would be:
What it is you’re doing e.g. what system / what code you’re using (simplified if possible)
What part of Companies House API you’re accessing
The data you send
The errors / data you get back.
Don’t put any of your API key details / passwords in your post though!