+ Reply to Thread
Results 1 to 4 of 4

New question

  1. #1
    Registered User
    Join Date
    10-27-2016
    Location
    Cincinnati, Ohio
    MS-Off Ver
    2010
    Posts
    8

    New question

    I am looking to create a payroll sheet. In order to do so I need to have four cells hold their value and only change when a new amount is input.
    So I need 4 cells to hold their Year-to-date total for: Gross pay -Medicare - FICA - Federal.
    I need the totals in each cell to change respectively as the Gross income is changed week to week. This is how I can do one number but I need to do 4 on the same form. Example-----
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$F$7" Then Range("G7") = Range("G7") + Target.Value
    End Sub

    This will hold one cell. I need to hold 4 cells. Can someone please help?
    Thanks
    Larry

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: New question

    Just add the same If statement in the same Sub for the others, just change the Cell ranges.
    For example, if you want to have D7 as the target cell, and E7 as the cell that changes, use
    Please Login or Register  to view this content.
    Right after the 1st If statement.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Registered User
    Join Date
    10-27-2016
    Location
    Cincinnati, Ohio
    MS-Off Ver
    2010
    Posts
    8

    Re: New question

    Thank you much for your help. I thought maybe the answer would be easier than I expected.
    Appreciate it!!!

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: New question

    You're welcome. Glad I was able to help.

+ 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. [SOLVED] Mathematical question or excel question? Multiple several numbers in a row.
    By douglascaixeta in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-22-2015, 05:48 PM
  2. [SOLVED] Objective Question: High light the right answer with green before next question.
    By ebin charles in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2015, 12:38 PM
  3. database question, excel data sorting question
    By weblisterltd.com in forum Excel General
    Replies: 1
    Last Post: 12-17-2014, 01:35 PM
  4. code to progressively go throughly question based on answer to first question
    By Ishwarind in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2014, 06:48 AM
  5. [SOLVED] Question regarding conditional format question that covers two range criteria
    By lilsnoop in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-06-2013, 12:32 PM
  6. Replies: 3
    Last Post: 06-17-2011, 08:09 AM
  7. Two question, numeric code question and subtraction of two columns?
    By mgsweden78 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2008, 02:50 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