LF356 opamp FET input is in a inverting amplifier configuration here. R4 + R5 make up Ri each 1/4 W MFR withstands 250V so both will take upto 500V. Use more in series for higher voltage withstand with care in PCB layout and cabinet insulation.
Voltage Attenuator Amp - DMM Project
Rf is selected by a digital value at A-B inputs of 4052, that way R1, R2, R3, R6 are selected for four ranges giving various attenuation levels. The important thing in this circuit is the on resistance of 4052 of 100 ohms comes in series with the output resistance of opamp, so the output is taken before the cmos switch . The output of this digital attenuator should not be loaded and should be buffered before use.
Gain = Av = Rf/Ri and Vout = -(Rf/Ri) * Vin
Rf and Ri are 0.1% MFR, if costly, use bourns 10T trimpot or a difficult way use series parallel combination and scratch 10% part of a network R to increase value.