Matching 2 Cell Values with 1 value minus 5 characters

YeshyTiger

New Member
Joined
Oct 21, 2008
Messages
23
Hello,

I did not know how to describe this problem or where to search for the solution so I will gladly accept redirection.

Right now I am trying to do a check of an Excel sheet that confirms the values are in correct heirarchal order

The one common theme is that the value of certain Cells should be the same as the previous cell minus 5 characters


I created A check that does not work and now I'm trying to test code. I have

Code:
For I = 63 To 1061
If Cells(I - 1, 5).Value <> Cells(I, 5).Left(Cells(I, 5).Value, Len(Cells(I, 5).Value) - 5) Then
Cells(I, 1).Value = 1
End If
Next I
 
                        'For I = 63 To 1061
                        'If Cells(I, 5).Value Like "*[ML,GN,DL]*" And Cells(I - 1, 5).Value <> Left(Cells(I, 5).Value, Len(Cells(I, 5).Value) - 5) Then
                        'Application.ScreenUpdating = True
                        'Cells(I, 5).Select
                        'Response = MsgBox("Are Milestones in Correct Place?", vbExclamation + vbYesNoCancel)
                        'Select Case Response
                            'Case Is = vbYes
 
                            'Case Is = vbNo
                                'ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\Desktop\PMP Input Folder\" & ActiveWorkbook.Name, FileFormat:=xlNormal
                                'Exit Sub
                            'Case Is = vbCancel
                                'Exit Sub
                        'End Select
                        'End If
                        'Next I
End Sub


The comments are the eventual check. Any idea of how to fix the code are compare the cell values better?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,094
Latest member
teemeren

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