A difficult pair of words, as both are designed to create uncertainty - that is - they are used when the precise amount or thin is not certain.
Some is usually used when the amount or the identity is undetermined -
Some person left an umbrella. (the identity being undetermined)
I have some eggs (the number being undetermined)
I have some sugar (the amount being undetermined)
Any is also undetermined, but seems to mean 'not none' - an amount that is not zero.
Does anyone have an umbrella?
Do you have any eggs?
Do you have any sugar? in each case you are asking if the amount is not zero.
The answer would then be --
I do not have an umbrella or I have an umbrella
I do not have any eggs. or I have some eggs.
I do not have any sugar or I have some sugar
So any is used in the question form or in the negative form --
are there any ....?? There aren't any ....
But any can also be used to specify that a precise answer is not needed.
Anybody can do it. in other words Not a specific person
Any amount will do NOT a specific amount
Any port in a storm NOT a specific port.
So if the ANY sentence you are looking at is not a question or a negative it is probably a specific indefinite - That makes sense doesn't it??
Student or Learner