+ Reply to Thread
Results 1 to 5 of 5

How to write VBA, so I can refresh input cell and capture all outputs from each loop

  1. #1
    Registered User
    Join Date
    07-04-2014
    Location
    CA
    MS-Off Ver
    2010
    Posts
    3

    How to write VBA, so I can refresh input cell and capture all outputs from each loop

    hi, need some help. i attach the file below. try to simplify the question.

    assuming i have three worksheets:
    1) input: col A has a series of product code (string)
    2) calculation: where I want to automatically copy and paste each product code from "input" worksheet into "calculation" cell B4, and through many steps of calculations, return the outputs in cell B8 and B9 (parameters are numeric)
    3) output: how to automatically record B8 and B9 from "calculation" sheet to this sheet Row 5 and 6 from each loop? (format of output doesn't really matters)

    thanks. Any advice would be helpful.
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,298

    Re: How to write VBA, so I can refresh input cell and capture all outputs from each loop

    You'd need a worksheet change event handler monitoring the input cell(s). When an input cell changes, copy it to cell B4. This will generate the calculated/output cells, B8 and B9. Then it needs to copy the input and output cells and paste special values to the next available row on the audit sheet.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    07-04-2014
    Location
    CA
    MS-Off Ver
    2010
    Posts
    3

    Re: How to write VBA, so I can refresh input cell and capture all outputs from each loop

    what's wrong with it?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,298

    Re: How to write VBA, so I can refresh input cell and capture all outputs from each loop

    Nothing's wrong with it. I just posted the answer to another thread here. So then I ended some holding text until I could answer properly. Now it' sure placed with a suggested approach.

    Regards, TMS

  5. #5
    Registered User
    Join Date
    07-04-2014
    Location
    CA
    MS-Off Ver
    2010
    Posts
    3

    Re: How to write VBA, so I can refresh input cell and capture all outputs from each loop

    Many Thanks, i think I figure out how to do that. still new to loop things. ^_^

+ 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. Calculate formulas/UDFs from input and outputs
    By mc84excel in forum Excel General
    Replies: 8
    Last Post: 10-20-2013, 07:23 PM
  2. Sensitivity Table: 1 input, 2 outputs
    By Cheathering in forum Excel General
    Replies: 1
    Last Post: 09-14-2011, 11:26 AM
  3. One row of input, two rows of outputs
    By GoodGuyGary in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-09-2009, 06:19 AM
  4. 1 VLOOKUP/IF Input and 2 Outputs? How?
    By tdglogik in forum Excel General
    Replies: 5
    Last Post: 07-21-2007, 05:00 AM
  5. Capture cell input date/time
    By Fraggs in forum Excel General
    Replies: 0
    Last Post: 02-03-2005, 12:19 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