Clicky

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!

asked 12/13/2011 09:24

Amour22015's gravatar image

Amour22015 ♦♦


10 Answers:
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
link

answered

gowflow's gravatar image

gowflow

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!
link

answered 2011-12-14 at 03:08:23

Amour22015's gravatar image

Amour22015

ok fine what do you want the user to input in the inputbox ? any text ? or you have some special values ?
gowlfow
link

answered 2011-12-14 at 05:31:45

gowflow's gravatar image

gowflow

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!
link

answered 2011-12-14 at 07:59:42

Amour22015's gravatar image

Amour22015

gowflow


sorry I meant to say:

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

Thank you!
link

answered 2011-12-14 at 08:10:07

Amour22015's gravatar image

Amour22015

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!

link

answered 2011-12-14 at 08:16:42

Amour22015's gravatar image

Amour22015

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
link

answered 2011-12-14 at 14:59:25

gowflow's gravatar image

gowflow

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!
link

answered 2011-12-16 at 00:44:10

Amour22015's gravatar image

Amour22015

Had to close this one I found the problem.

Thank you for helping
link

answered 2011-12-16 at 04:40:51

Amour22015's gravatar image

Amour22015

pls post the link in here and will be glad to help
gowflow
link

answered 2011-12-16 at 04:42:05

gowflow's gravatar image

gowflow

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×16
×19
×36
×83

Asked: 12/13/2011 09:24

Seen: 322 times

Last updated: 12/15/2011 08:42