+ Reply to Thread
Results 1 to 7 of 7

Output formula result

  1. #1
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Output formula result

    Hello,
    How do you write a code that will calculate a formula and output the result in a cell?

    For example:

    A1 = 1 (Named "Cell1")
    A2 = 2 (Named "Cell2")
    A3 = Results of macro for Cell1+Cell2 = 3

    Is there a way to write it if I also want B3 = B1 + B2 and C3 = C1 + C2, etc.

    Thanks.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Output formula result

    Can you be more specific?

    It may be that a FUNCTION which accepts parameters is appropriate, then you can use it like any regular Excel function, in a cell / range of cells, by passing relative cell references as function arguments...

    Hard to say without understanding what the code is doing, though.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Output formula result

    How about doing it just the way you have it there?

    In B3, type in =B1+B2
    Then copy that across

    whatever you put in B1 and B2 will ve added up and shown in B3
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Re: Output formula result

    Thanks but that's not a macro.

  5. #5
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Re: Output formula result

    I need to write a more complicated macro that gives the results of a COUNTIF statement for multiple variables.

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Output formula result

    We'd love to help

  7. #7
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Re: Output formula result


+ 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. Replies: 1
    Last Post: 01-06-2014, 03:54 AM
  2. Output result from formula into different cell
    By jdeboef in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-11-2012, 03:06 PM
  3. formula to count & output result in different color
    By chano in forum Excel General
    Replies: 4
    Last Post: 01-04-2012, 10:35 PM
  4. output formula result into another cell
    By JMW123 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-29-2011, 08:44 AM
  5. Output result of a formula to a different cell?
    By nawu in forum Excel General
    Replies: 15
    Last Post: 04-03-2011, 09:12 PM

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