Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Click cell on that row column 11 add word

Posted on 2016-09-13
8
Medium Priority
?
62 Views
Last Modified: 2016-09-13
Hello Experts Exchange users

I am trying to add a macro on a button

On any clicked cell
Look for that exact row
Column 11
Put in the word (DONE)

Thanks for your help and time guys. I really appreciate it.

Click-on-cell-on-that-row-column-11-.pngClick-on-cell-on-that-row-column-11-.pngFIXED-COMPLETED-9-6.xlsm
0
Comment
Question by:Omar Hernandez
  • 4
  • 4
8 Comments
 
LVL 49

Expert Comment

by:Martin Liss
ID: 41796914
Add lines 2 to 4 at the top of your GENERAL sheet's Worksheet_SelectionChange code.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(ActiveCell, Range("K4:K999999")) Is Nothing Then
    ActiveCell.Value = "Done"
End If

    Application.ScreenUpdating = False
    
            Dim rownumber As Integer

            rownumber = ActiveCell.Row

Open in new window

0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 41796915
My code looks for clinks in the ORGANIZER3 column. If you want it in the next column instead then change line 2 to If Not Intersect(ActiveCell, Range("L4:L999999")) Is Nothing Then
0
 

Author Comment

by:Omar Hernandez
ID: 41796977
Hello there Martin Liss, Before anything thanks for your quick response. I have done what you have suggested but The actual button that is label DONE. the Macro is not created on it may you guide me to get this working, thanks again
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 49

Accepted Solution

by:
Martin Liss earned 2000 total points
ID: 41796986
Oh, sorry, ignore my code above. Assign this macro to the DONE button. If you need help doing that then please let me know.

Sub RectangleBeveled7_Click()
    Cells(ActiveCell.Row, "K") = "DONE"
End Sub

Open in new window

0
 

Author Comment

by:Omar Hernandez
ID: 41797002
Thanks a mil Martin Liss this did the trick, I know that you have just assisted me with the solution. but wanted to ask you a question before finishing up.

Is it possible to have this button to have two function that if i click on it once it will add "DONE" and if it has "DONE" when click clear that exact cell ?
0
 

Author Closing Comment

by:Omar Hernandez
ID: 41797004
Thanks again for the Best solution Martin
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 41797016
Sub RectangleBeveled7_Click()
    If UCase(Cells(ActiveCell.Row, "K")) = "DONE" Then
        Cells(ActiveCell.Row, "K") = ""
    Else
        Cells(ActiveCell.Row, "K") = "DONE"
    End If
End Sub

Open in new window


You're welcome and I'm glad I was able to help.

Expand my profile’s “Full Biography” and you'll find links to some articles I've written that may interest you.

Marty - Microsoft MVP 2009 to 2016
              Experts Exchange MVE 2015
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2015
0
 

Author Comment

by:Omar Hernandez
ID: 41797020
Will do, thanks again friend
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question