+ Reply to Thread
Results 1 to 2 of 2

get Simple Macro

Hybrid View

brownl get Simple Macro 03-24-2006, 04:57 PM
Guest re: get Simple Macro 03-24-2006, 05:15 PM
  1. #1
    Registered User
    Join Date
    03-24-2006
    Posts
    1

    get Simple Macro

    Hello,
    I am a beginner with macros, so please bear with me. I need to write a simple macro for a sheet in order to simplify a repetitive task. I have 2 columns, each with a dollar amount that gets added to a new cell each day by one user. At another point in the day, a different user accesses the sheet and needs to add an amount to one column and then have that amount subtracted from the column that the first user entered. She goes in and does this manually multiple times a day every day. I tried to record a macro to do it but it I can't get it to do what I want. So I tried to edit the macro to my needs an it spits out an error which I'm sure is due to my lack of VB knowledge. Here is the recorded macro:
    Sub Macro4()
    '
    ' Macro4 Macro
    ' Macro recorded 3/21/2006 by simoro
    '

    '
    ActiveCell.FormulaR1C1 = "=35246.15-RC[1]"
    Range("E25").Select
    End Sub
    Obviously it's very simple. Can anyone help?

  2. #2
    Don Guillett
    Guest

    re: get Simple Macro

    right click sheet tab>view code>insert this>change column to fit. Now when
    the 2nd user enters data in col 7 (or yours) then col 8 will show col 6-col
    7.

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column <> 7 Then Exit Sub
    Target.Offset(, 1) = Target.Offset(, -1) - Target
    End Sub


    --
    Don Guillett
    SalesAid Software
    dguillett1@austin.rr.com
    "brownl" <brownl.256zdz_1143234003.4017@excelforum-nospam.com> wrote in
    message news:brownl.256zdz_1143234003.4017@excelforum-nospam.com...
    >
    > Hello,
    > I am a beginner with macros, so please bear with me. I need to write a
    > simple macro for a sheet in order to simplify a repetitive task. I have
    > 2 columns, each with a dollar amount that gets added to a new cell each
    > day by one user. At another point in the day, a different user
    > accesses the sheet and needs to add an amount to one column and then
    > have that amount subtracted from the column that the first user
    > entered. She goes in and does this manually multiple times a day every
    > day. I tried to record a macro to do it but it I can't get it to do
    > what I want. So I tried to edit the macro to my needs an it spits out
    > an error which I'm sure is due to my lack of VB knowledge. Here is the
    > recorded macro:
    > Sub Macro4()
    > '
    > ' Macro4 Macro
    > ' Macro recorded 3/21/2006 by simoro
    > '
    >
    > '
    > ActiveCell.FormulaR1C1 = "=35246.15-RC[1]"
    > Range("E25").Select
    > End Sub
    > Obviously it's very simple. Can anyone help?
    >
    >
    > --
    > brownl
    > ------------------------------------------------------------------------
    > brownl's Profile:
    > http://www.excelforum.com/member.php...o&userid=32800
    > View this thread: http://www.excelforum.com/showthread...hreadid=526219
    >




+ 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