best way to crud 2d hash with ranges

I have a Product model (name:string, value:integer, quality:integer) and different table for each product with percent's. Real value of product depend on the percent from the table, taked from value range and quality range.

For example I have this table for first product (row => quality range, cols => value range): [Attachment]