+ Reply to Thread
Results 1 to 2 of 2

Thread: Vba code to add values

  1. #1
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Post Vba code to add values

    Q1:

     
    Sub Test()
    Range("A1") = 1
    Range("B1") = 2
    Range("C1") = Evaluate("sum(A1:B1)")
    End Sub
    Q2 Worksheets(Insert Sheet name here)
     
    Sub CopyV()
    Range("C1").Copy Worksheets(2).Range("A1")
    End Sub
    To to auto fill for the next 100 rows
    You can do

    Range("C1").Autofill range("C1:C100")
    To thank someone who has helped you, click on the star icon below their name.

    I hate reading

    Portfolio

    I need a job.
    I am young and incompetent

  2. #2
    Registered User
    Join Date
    01-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    13

    Post Vba code to add values

    hi all i am new to programming in excel

    For example user enters the value 1 in A1 and 2 in B2 The answer should be in 3 in C1
    How to write this code ? Also is there any way where i can let the user copy the VALUE from the result (C1) into another Sheet in case if am using + Sign to obtain the result in C1 instead of writing a VBA Code
    Basically i am looking for the user to in put data in A and B and the result should come in C and the user should copy the value from C into another sheet. The user should not have access to the formula.

    Many Thanx

    I posted this in other forum also http://www.mrexcel.com/forum/showthr...=1#post2989809

+ 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