Replacing a Potentiometer with a voltage divider

I've been playing with a 10K pot to troubleshoot to try and find the perfect volume for a piezo buzzer. I have now found that volume and want to replace it with a more permanent solution.

Is a pot basicly a voltage divider? Therefore if I am using half of a 10k Pot I can basicly repalce it with a voltage divider with 2 5k resistors; or any resistor configuration as long as they add up to 10?

This is an image of what I am trying to do. I am trying to repalce the circuit on the elft with the one on the right:

Thanks

yes, how you've got it wired in the first one, the POT is acting as a voltage divider. If youve got the pot turned half way then you can replace it with two 5k resistors as you have shown in the second one, it youve got the pot set differently to halfway, then you'll need to replace it with two different values adding up to 10k. Best way to do this is to measure the resistance from the wiper pin to the other two legs, find resistors at the same resistance and hey presto!