+ Reply to Thread
Results 1 to 2 of 2

Thread: Formula to always capture "X"

  1. #1
    Registered User
    Join Date
    11-11-2011
    Location
    Ohio, United States
    MS-Off Ver
    Excel 2003
    Posts
    1

    Red face Formula to always capture "X"

    I am using Excel 2003 and I keep a running spreadsheet daily of customer e-mail/phone calls and in most columns I type in X. It would be nice to have a formula that would work so no matter what is typed in the field, it shows X. Is there a formula for this?

    Thank you!

  2. #2
    Forum Guru pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,150

    Re: Formula to always capture "X"

    Hi J-Coop
    Welcome to the forum
    you could use a worksheet event

    Private Sub Worksheet_SelectionChange(ByVal _
                        Target As Excel.Range)
        Dim myRange As Range
       Application.EnableEvents = False
        On Error Resume Next
        Set myRange = Intersect(Range("A1:A10"), Target)
        If Not myRange Is Nothing Then
               If Target.Value = "X" Then
               Target.Value = ""
               Else
               Target.Value = "X"
               End If
        End If
     Application.EnableEvents = True
    End Sub
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    VBA for smarties - snb

+ 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