+ Reply to Thread
Results 1 to 4 of 4

Typing in a number on a cell that already has an active cell function without earasing fun

Hybrid View

jjin Typing in a number on a cell... 01-06-2013, 01:02 AM
HaHoBe Re: Typing in a number on a... 01-06-2013, 04:44 AM
jjin Re: Typing in a number on a... 01-07-2013, 10:38 PM
HaHoBe Re: Typing in a number on a... 01-08-2013, 12:57 AM
  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Typing in a number on a cell that already has an active cell function without earasing fun

    Hi guys,

    Please open the sample excel file attached below first so you have better understanding of my question.

    Cheers,
    Attached Files Attached Files

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 365 on Win11 (365 on Win11 (desktop), 365 on Win11 (notebook)
    Posts
    8,207

    Re: Typing in a number on a cell that already has an active cell function without earasing

    Hi, jjin,

    maybe use the Worksheet_Change-Event behind Sheet1 for this:
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Count > 1 Then Exit Sub
    If Not Intersect(Target, Range("A5:B5")) Is Nothing Then
      Range("D5").Value = IIf(Range("A5").Value - Range("B5").Value > 0, "Yes", "No")
    End If
    End Sub
    I didn´t put in the formula but only the result as you mentioned that the formula may get lost to overwriting.

    ..without erasing function
    AFAIK no chance without a helper cell for direct entries.

    Ciao,
    Holger
    Attached Files Attached Files
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: Typing in a number on a cell that already has an active cell function without earasing

    Hi HaHobe,

    Thank you for the quick reply. That's exactly what I am after but then I will have to change the existing code that I already have on the cell in order to apply the new code you suggested above isn't it? The code thats currently running on the cell is quite long and I have no clue how to combine it with your new code. :P

    Any other suggestion without altering my existing code on the worksheet?

    Cheers,

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 365 on Win11 (365 on Win11 (desktop), 365 on Win11 (notebook)
    Posts
    8,207

    Re: Typing in a number on a cell that already has an active cell function without earasing

    Hi, jjin,

    maybe you should not only mention that you have VBA-Code but show the code - maybe it can be amended to suit?

    Ciao,
    Holger

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.6.0 RC 1