Adding 17 will not fix the given function. A couple of things need to be done to fix it. F, is the highest digit in hex so you need to add F to the end of the string, then once that is done, 1 is the smallest digit, so cut the 0 off the front. To get,
=CHOOSE(TRUNC(F6/16),"1","2","3","4","5","6","7","8","9","A","B","C","D","E","F")&CHOOSE(MOD(F6,16),"1","2","3","4","5","6","7","8","9","A","B","C","D","E","F")
This will give you correct results for most decimal numbers. It does not work if you have even multiples of 16, I get a #value error, seems the choose function wants results >0. I see no easy way to fix this. The posted function is not an optimal solution.
I would use a VB macro to do this, base conversion does not lend itself to the spreadsheet cell structure. If time allows I will post later with a reliable VB solution.
Edit:
Ok, I made it work in the cell
try
=IF(TRUNC(F6/16)=0,"0",(CHOOSE(TRUNC(F6/16),"1","2","3","4","5","6","7","8","9","A","B","C","D","E","F")))&IF(MOD(F6,16)=0,"0",CHOOSE(MOD(F6,16),"1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"))