Find case sensitive difference between 2 cells

ESACAWIP

New Member
Joined
Nov 9, 2020
Messages
21
Office Version
  1. 365
Platform
  1. Windows
Hi,

Hope you can help, having a lot of trouble finding a solution. I have a large list of facilities names with incorrect formatting

BHCW boris health of wisconsin (Original)
Bhcw Boris Health of Wisconsin (After using =Proper formula to format the text)

Everything looks fine expect for the acronym at the front which should read "BHCW" instead. I was thinking is it possible to have a vba formula to highlight the case sensitive differences in each letter? That way I find more easily find issues and edit manually.

Bhcw Boris Health of Wisconsin


Thank you!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
What about this formula if your Data is in A2:
Excel Formula:
=UPPER(LEFT(A2,FIND(" ",A2,1)))&PROPER(RIGHT(A2,LEN(A2)-FIND(" ",A2,1)))

Book17.xlsm
ABC
1
2Bhcw Boris Health of WisconsinBHCW Boris Health Of Wisconsin
3
Temp
Cell Formulas
RangeFormula
C2C2=UPPER(LEFT(A2,FIND(" ",A2,1)))&PROPER(RIGHT(A2,LEN(A2)-FIND(" ",A2,1)))
 
Upvote 0
Hi maabadi,
Thanks for the response

Sorry I forgot to mention my list contains many inconsistencies. I believe no formula can resolve this so my goal is to use the "=proper" formula and then have another VBA to highlight the differences so I can manually edit.

ie:

Bank of the West (CMPT Branch)
CDE Hospital Center
Johnson (SGD) Memorial
 
Upvote 0
This code only change Lower case words to Proper case and don't touch Uppercase for all Data at column A. Check it:
VBA Code:
Sub MergeSheets2()
Dim xArr As Variant, xI As Integer, PCase As String
Dim i As Long, Lr As Long, j As Long
On Error Resume Next
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Lr = Cells(Rows.Count, 1).End(xlUp).Row

For i = 1 To Lr
If Range("A" & i).Value <> "" Then
xArr = Split(Range("A" & i).Value, " ")
For xI = 0 To UBound(xArr)
If UCase(xArr(xI)) = xArr(xI) Then
Else
PCase = StrConv(xArr(xI), vbProperCase)
xArr(xI) = PCase
End If
Next xI
Range("E" & i).Value = Join(xArr, " ")
End If
Next i
Application.ScreenUpdating = True
Application.DisplayAlerts = True
 
End Sub
 
Upvote 0
Thank you maabadi!


Do you know if something like this is possible for column C

OriginalEditedDifference
700 West Fabyan Parkway700 West Fabyan PkwyPkwy
700 West Fabyan Parkway Nw700 West Fabyan Parkway NWNW
700 West Fabyan Parkway Nw700 West Fabyan Pkwy NWPkwy, NW
700 West Fabyan Parkway Nw700 W Fabyan Pkwy NWW, Pkwy, NW
 
Upvote 0
if you have index for replacing specific word is separate cell, it con done. but without index , I cannot , maybe others have option for you.
And please Upload file with example and all desired results, if you prepare index words and replacing phrases.
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,175
Members
449,071
Latest member
cdnMech

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