Excel 2007 Conditional Linking

Thank you all for helping me!

I have this code:

If Not Intersect(Target, Range("C5:C600")) Is Nothing Then
         'Selected with Other option
        If Cells(Target.Row, 3) = "Other" Then
             'User types in and comes back with user input to cell
            Application.EnableEvents = False
            'Do While Cells(Target.Row, 6) = ""
                 'Get data from user
                If SaveValC <> "" Then
                    Cells(Target.Row, 3) = InputBox("Enter data for CLASS", "Mandatory data entry", SaveValC)
                Else
                    Cells(Target.Row, 3) = InputBox("Enter data for CLASS", "Mandatory data entry")
                End If
                 SaveValC = Cells(Target.Row, 3)
            'Loop
            Application.EnableEvents = True
        End If
        For Each change In Target.Cells
            If change.Text <> "Other" And Target.Text <> "" Then
            Application.EnableEvents = False
                message = InputBox("Enter Justification for Column " & Mid(change.Address, 2, 1), "Mandatory data entry")
                '-- insert data in target sheet
                Worksheets("JUSTIFICATION").Range(change.Address) = message
                '-- insert comment in current sheet
                Cells(change.Row, 3).Hyperlinks.Add Cells(change.Row, 3), "", "JUSTIFICATION!" & change.Address, , change.Text
                Application.EnableEvents = True
       
            End If
        Next change
    End If

I need:

If Cells(Row, 2) = Cells(Row,3) then no JUSTIFICATION 'If they match

Otherwise I need Mandatory JUSTIFICATION.

This code above does not work

Please Help!

Thank you!
Amour22015Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gowflowCommented:
You mention:
===
If Cells(Row, 2) = Cells(Row,3) then no JUSTIFICATION 'If they match
Otherwise I need Mandatory JUSTIFICATION.
This code above does not work
===
Don't know if you are aware but this code looks for any data that is input between cell C5 and C600 and then it ask for a justification input box and when anything is inout there it will look for a sheet called: JUSTIFICATION and copy whaterver was entered in the inputbox in the same column same row in the sheet JUSTIFICATION and turn the data that was originally input in sheet1 to hyperlink !!!

This is what this code is doing !!!

Now your post ask for something completly diffrent.
Can you pls post a sample workbook it would make our life easier to decript what you need.

rgds/gowflow
0
Amour22015Author Commented:
gowflow

When prompted for the justification I want that to be Mandatory.  I know that it looks for input between C5 and C600.  I also know that it writes to the JUSTIFICATION worksheet.  What I want is for it to be Mandatory?

Why would you need a sample workbook, the logic is all there.


Thank you!
0
gowflowCommented:
ok fine what do you want the user to input in the inputbox ? any text ? or you have some special values ?
gowlfow
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Amour22015Author Commented:
gowflow

Thank you!

I worked out about the Mandatory, so that part is ok now.

But I still have:

If Cells(Row, 2) = Cells(Row,3) then no JUSTIFICATION 'If they match
Otherwise I need Mandatory JUSTIFICATION


And this is the real problem:

There is a drop-down in:
Cells(Row, 3)

The request that was given to me is that they want this in the drop-down:

C = Cat
D = Dog
TBD = To Be Determined
C - D = Cat and Dog
Ref = Reference (Text should provide reference)

And so on to about 25 different items.

What is in Column B or Cells(Row, 2) could be:
C
Or:
D
Or:
Ref

and so on.

So you notice that they do not match? But they kind of Match?

So I have to do something like:
If Cells(Row, 3) = "Ref = Reference (Text should provide reference)" And Cells(Row, 2) = "Ref" Then
Exit Sub
Else
If Cells(Row, 3) = "C = Cat" And Cells(Row, 2) = "C" Then
Exit Sub
Else


And so on.

Is there a way to do this samething but with this code? Or am I on the right track?

Thank you very much for helping me!
0
Amour22015Author Commented:
gowflow


sorry I meant to say:

Is there a way to do this samething with less coding?

Thank you!
0
Amour22015Author Commented:
gowflow

Thank you!

I tried:
If Cells(Target.Row, 3) = "Ref = Reference (Text should provide reference)" And Cells(Target.Row, 2) = "Ref" Then
Exit Sub
End If
If Cells(Target.Row, 3) = "C = Cat" And Cells(Target.Row, 2) = "C" Then
Exit Sub
End If

And so on.

That did not work?

Please help!

Thank you!

0
gowflowCommented:
honestly I got lost with your latest 2 post I lost track and think you went totally outside the question. I am willing to help you full extent please restate clearly what you need help with so I can look at it once more.
gowflow
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Amour22015Author Commented:
gowflow


Thank you,

I found the problem and fixed it.  And that was just matching the text the correct way.

But I have one posting that no one has answered yet:
Excel 2007 Linking Multiple Text

If you could help with this one.

Thank you!
0
Amour22015Author Commented:
Had to close this one I found the problem.

Thank you for helping
0
gowflowCommented:
pls post the link in here and will be glad to help
gowflow
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.