title: How to sort electronics values with suffixes (k, m, g, uF, H, etc.)?
body: <p>How to sort rows when a column has standard electronics "suffixes"?</p>
  
  <p>I see many questions here that are close, but most go the other way, like 
   <a href="https://stackoverflow.com/questions/25275247/format-numbers-in-thousands-k-in-excel">Format numbers in thousands (K) in Excel</a></p>
  
  <p>Anyone in electronics will immediately appreciate this problem. I have lots of parts lists, and am pasting values into Excel/GSheets. They are standard suffixes, but clearly not solely numbers. Here is a representative sample:</p>
  
  <pre><code>A       B       C       D
  RA367   0603    2.2     5% 1/10w MF-LF
  RA770   0201    5.1k    1% 1/20w MF
  RA775   0201    5.1k    1% 1/20w MF
  RB600   0402    0       5% 1/16w MF-LF
  RB604   0201    0       5% 1/20w MF
  </code></pre>
  
  <p>Only column C is needed to sort. The suffixes vary on the type of component, but are not mixed when sorted. In other words, you would never sort a column of 'mixed' components such as:</p>
  
  <pre><code>2.5k
  1.0pF
  10m
  20uF
  2 kOhms
  [...]
  </code></pre>
  
  <p>The mutiplier portion of the suffixes would always be the same, as in R, k, m, , are typically resistors; pF, F, and uF are capacitors, H, uH, etc. is for inductors (for Henries), etc. So it is best if "conversion" for sorting consider only the first character (u, p, k, m, R) which are always the <em>multiplier</em>, and if no multiplier character (as in the 0 in the first example) just sort as a number.</p>
  
  <pre><code>1.1       = 1.1
  1.1 k     = 1100
  1.1k      = 1100
  1.1kOhms  = 1100
  1.1k Ohms = 1100
  [...]
  </code></pre>
  
  <p>This is because lots of parts listings will omit the type of value (resistor, capacitor, etc.) and only give the base number (1, 2, 40, 1m, 2.2k, ...). his is because again, values of different components are never mixed.</p>
  
  <p>Here is a real-world snippet from a large distributor, from a downloaded CSV:</p>
  
  <pre><code>[...]
  0 Ohms
  100 kOhms
  100 kOhms
  100 kOhms
  1 MOhms
  1 MOhms
  1 MOhms
  100 Ohms
  100 Ohms
  100 Ohms
  49.9 Ohms
  [...]
  </code></pre>
  
  <p>Here you can see how the default sorting on first, second character fails, and that there is even a space between the base and multiplier. A solution should not have to worry about a finite list of <em>types</em> of components, ignoring the Ohms, R, H, F, etc. after the value is determined by the base and optional multiplier.</p>
  
  <p>These are the only two ways you will see components listed-with or without that space. I am wondering if there is a single, elegant function to apply to a range, or if multiple ones are needed based on the space introduced in the second example.</p>
  
  <p>This may seem like an obscure problem, but large suppliers offer CSV downloads of their products, and when you need to order, and are combining lists in different formats, it becomes <em>most</em> cumbersome.</p>