I am creating a parts list and I want to be able to enter values into a cell and have them formatted in engineering format with engineering labels. I have made a custom format for resistor values so that when you enter 1600 it formats it to 1.6 k and when you enter 1000000 it formats it to 1.0 M. This is important so that if the parts were to be sorted by value, they would be in the correct order. If you were to just enter 1.6 k and 1.0 M and 1.0 k, then sorting them would make them 1.0 k 1.0 M and 1.6 k which is not correct. Now I would like to do the same but for capacitors, which are normally decimal values <1 . For example, 0.000001 would be 1 u and 0.001 would be 1 m and so on. Using the engineering notation format ##0.0E+0 does this, but I want the E+0 to be replaced by the symbol that represents the SI unit. Is there a way to use the custom formatting to do the engineering notation calculation but hide the E+0 part? Or is there some other way to make the custom formatting manipulate the decimal place? I have the conditional part of the custom format so that it recognizes what symbol to use. Any ideas?
Here is the custom format code I used for the resistor values.
[>999999]##0.00?,,"MΩ";[>999]##0.00?," kΩ";##0.00??" Ω"
this code lines up the decimal points as long as the cells are right aligned
Here is what I have for the conditional part for capacitor values. The 0.00 part is what needs to be changed.
[<0.000000001]0.00" pF";[<0.000001]0.00" nF";0.00" µF"
Bookmarks