+ Reply to Thread
Results 1 to 2 of 2

Change Value in Same Cell

  1. #1
    Registered User
    Join Date
    08-20-2008
    Location
    Los Angeles
    Posts
    1

    Change Value in Same Cell

    Is it possible to type a value in a cell, and have Excel automatically run a function and spit the results back in the same cell?

    For example, when I type in $400 in B2, I'd like B2 to automatically add on 35% of $400 and change to $540.


    DAYS RATE
    10 $400


    Is this even possible???

    Thanks in advance...

    ~Shirley

  2. #2
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    Right click on the tab for the sheet you want the calculation to take place and choose view code. Paste the following:


    Private Sub Worksheet_Change(ByVal Target As Range)

    If Not Intersect(Range("b2"), Target) Is Nothing Then
    Application.EnableEvents = False
    Range("b2") = Range("b2") * 1.35 'change for different rate increase
    Application.EnableEvents = True
    End If
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Change cell value based on cell color?
    By Excel_Drone_VII in forum Excel General
    Replies: 14
    Last Post: 05-31-2013, 11:11 AM
  2. Replies: 2
    Last Post: 04-11-2008, 02:11 AM
  3. Change Cell Value
    By shguser in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2008, 04:47 PM
  4. Change populated cell names via macro
    By TJM in forum Excel General
    Replies: 2
    Last Post: 09-12-2006, 10:47 PM
  5. change color and value of cell by formula
    By jurjon in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-12-2006, 11:00 AM

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