Comparing a number without dimensional units with one that has dimensional units?

InOverMyH3ad

New Member
Joined
Sep 17, 2018
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Scenario:

Cell A: 12
Cell B: 12" (or even 12 in.)

Cell A will never have units. It will always be cell B that will be the issue. I'm trying to figure out a way to be able to compare the two cells and determine if they are equal or what the difference between them us. The issue is getting excel to ignore the units after the numbers. Is this possible in some sort of non-VB way?
 
The formula in #10 won't work if there are repeating numbers, redo:
Book1
AB
1
212"12
312 in12
412.5 in12.5
516.584 in16.584
616.5821 "16.5821
7It's 3.5 inches long3.5
8111"111
Sheet1
Cell Formulas
RangeFormula
B2:B8B2=LET(x,XMATCH(TRUE,ISNUMBER(--MID(A2,SEQUENCE(LEN(A2)),1)),,{1;-1}),--MID(A2,MIN(x),MAX(x)-MIN(x)+1))
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,224,525
Messages
6,179,317
Members
452,905
Latest member
deadwings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top