Forming my own numeric representations

  • Thread starter Thread starter WallyWallWhackr
  • Start date Start date
W

WallyWallWhackr

Hi guys.

I want to take a number with decimal included, and create a number where
the decimal has been replaced by the letter "R".

Is this a simple custom format setup or more difficult?

I want 0.1 to appear as 0R1

so our 4.87 k Ohms would be their 4R87 k Ohms.
 
Assume that your Input cell is A1

A1 cell
4.87

In B1 cell copy and paste the below formula
=SUBSTITUTE(A1,".","R")

B1 cell result will be 0R1.

Drag the below formula to the remaining cells of B Column depends upon
the Column A Input.

Change the cell reference A1 in the above formula to your desired
cell, if required.
 
Assume that your Input cell is A1

A1 cell
4.87

In B1 cell copy and paste the below formula
=SUBSTITUTE(A1,".","R")

B1 cell result will be 0R1.

Drag the below formula to the remaining cells of B Column depends upon
the Column A Input.

Change the cell reference A1 in the above formula to your desired
cell, if required.

Cool. Thanks, but is their any way to do it via cell formatting?
 
The short answer is NO.

The decimal separator is controlled by your Regional Settings (in
control panel). You COULD change it from a "point" to an "R".
However, that would change the decimal on all of your worksheets, and
perhaps elsewhere; and would only work on computers where the decimal
separator had been set this way, too.


Cool. If all I am using it for is display purposes, I am quite sure now
that the substitution method mentioned earlier will work quite fine.

Thanks all for your input.
 
Hi guys.

 I want to take a number with decimal included, and create a number where
the decimal has been replaced by the letter "R".

 Is this a simple custom format setup or more difficult?

  I want 0.1 to appear as 0R1

 so our 4.87 k Ohms would be their 4R87 k Ohms.

You can get near it 0"R.0 will get you 0R.1, and 0"R".00" k Ohms" will
give you 4R.87 k Ohms, but to do all you want you would need to get
into VB.

Alan Lloyd
 
You can get near it 0"R.0 will get you 0R.1, and 0"R".00" k Ohms" will
give you 4R.87 k Ohms, but to do all you want you would need to get
into VB.

Alan Lloyd


It gets worse.

Numbers below 1.0 are shown decimal (R) first. Numbers between 1 and
1000 are shown with the R in place of the decimal. Numbers that are 1000
and up are shown where a lower case k replaces the decimal, and M for
mega values and G for giga values.

Using "SUBSTITUTE" worked until I noticed the other nuances. It would
take some doing for me to do it using substitutions on all those
instances. I was thinking of using a comparison table since the list of
values is not that big.
 
Your descriptions of what you want are inconsistent.

In the above, you write 0.1 --> 0R1

but in a later posting you write:

"Numbers below 1.0 are shown decimal (R) first"

which implies that 0.1 --> R1

Both of which, the Brits state are correct.

I am just trying to display our standard values using their
nomenclature, and they use the R as a decimal point and the presence of a
preceding zero is not required. Essentially, it can only refer to non
"stripe marked" resistors, because the list of valid numerals that can be
used in the first three (or two) significant digit values have no values
that begin with zero.

The E24, E48, and E96 "preferred values" all begin with a whole number,
and it is a rule.

A part that is bought and numerically marked and not marked using a
color coded demarcation are considered 'custom' values and can be marked
differently. The example being the numeric designation on a surface
mount resistor compared to the colored stripe designation on an axial
leaded, though-hole resistor.

Since the list is finite I could create a substitution for every value
or groups of values for each unique case or set of cases.

It simply does not merely follow the decimal as the way the industry
represents resistors using three significant digits and an order of
magnitude multiplier (with two of those being divisors).

Anyway, long story short, I have to give the resultant needs a bit more
research. I think substitution will be fine since this is not some huge
spreadsheet workbook full of difficult math or huge numeric data sets.

It should be no problem to simple use conditional formatting,data
validation, and substitutions, etc. to get all of the variants without
having to do every single permutation individually. I should be able to
reduce it to ten classes (or twelve) to match the twelve multiplication
factors, which determine which and whether or not a decimal occurs in
side the three significant digit set for the value being derived at the
time.

Should be no need for VB if I stick with Substututions, I will simply
have to do a LOT of them in the worst case.

I would have an entire lookup table.

Heck, the more I think about it, the easier I think it will be.

As Arnold would say... "I'll be back..."

I will return to give the link to the finished, refined workbook, and
the resultant yay or nay as to whether I succeeded or not.

Thanks for your help thus far. Feedback to follow.
 
Back
Top