+ Reply to Thread
Results 1 to 3 of 3

Thread: How to apply simple macros to only one column

  1. #1
    Registered User
    Join Date
    12-08-2011
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    27

    Question How to apply simple macros to only one column

    First off, my VBA/Macros is EXTREMELY limited. In fact, I don't really even know what I'm doing when it comes to this stuff.

    With that said, I have a simple macros as show below:

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    Target = "a"
    End Sub
    which allows me to place a checkmark in the cell on a double click.

    I want this to only apply to the N column in my spreadsheet. Is this possible?
    Last edited by JHizzal; 12-23-2011 at 11:14 AM. Reason: Solved

  2. #2
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,640

    Re: How to apply simple macros to only one column

    Try this
    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Target.Column <> 14 Then Exit Sub
    Target = "a"
    End Sub
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  3. #3
    Registered User
    Join Date
    12-08-2011
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: How to apply simple macros to only one column

    Works perfectly Roy. Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0