In Excel check the functions LOG - logarithm at any base, LOG10 - logarithm at the base 10, LN - natural logarithm (base e=2,718...) and select the one that complies with your needs.
The formula for changing the bases is not necessary when using Excel (or any other spreadsheet software with compatible functions). The function LOG by default works as the logarithm with the base 10 but it can have a second argument which can be any valid base.
LOG(x)=LOG(x,10)=LOG10(x)
The logarithm with the base other than 10 the example: LOG(8,2)=3 but LOG without explicitly specified base: LOG(8)=LOG(8,10)=0,903089987.