I know the OP had their problem solved, but in case someone else finds this while searching, to answer the question in the title:
Yes, just like in other spreadsheet programs, you can name variables for Google Sheets. To do so, in the "name box" (above the spreadsheet, to the left of "fx") where you would typically put in the address of a cell or range of cells.
If you click on the box (or hit Ctrl+J) then type a name in this box that does not match a cell address, it will name the highlighted cell (or range) that value and store it in the sheet. You can also manage these named variables with Data / Named Ranges in the menu.
This will bring up a sidebar where you can press "+ Add a range" to add a named range / variable.
You can then type in what you want to name you range / variable as well as select the range you want it to refer to, then press done.
That being said, that would not solve the OPs issue - the OP wants a variable localized within a formula. That is also something you can do in Google Sheets (that, last I checked, you CAN'T do in Excel). In Google Sheets, you can now used named functions by going to Data / Named functions.
This brings up the "Named functions" sidebar - and you can select "Add new function" at the bottom.
This then brings up the "New named function" sidebar.
Here, you can enter the name of your function, any variables you want to be "local" to the function (as "argument placeholders"), and then the actual formula.
This is how it would look for the OPs desired function:
(NOTE: Being a US user, I had to use commas instead of semicolons. The OP must be from a country that uses semicolons as a separator instead. Use the appropriate separator for your region)
Now to use the function, you just need to call it like any other spreadsheet function in the cell(s) you need it. For the OPs question, it would look like this in the appropriate cell:
=DATABAR( 10 * F3 / max(F$1:F$999) )
In the end, SPARKLINE
did the job the OP was trying to do, but if someone is searching for a more generic application, I hope this answer helps them.