Getting a bin with a value in the range


I would like to know if there is a function to get the bin number given a value,

for example if I have my data in the range (0, 40) in 10 bins,

there is a predefined function that could give me the bin number where it is stored for example the value 13??

Thanks for helping!

Use TAxis::FindBin, eg