+ Reply to Thread
Results 1 to 6 of 6

Problem which requires looping back and forth between 2 sheets of a workbook

  1. #1
    Registered User
    Join Date
    04-02-2021
    Location
    Doha, Qatar
    MS-Off Ver
    Excel 2016, 32-bit
    Posts
    2

    Problem which requires looping back and forth between 2 sheets of a workbook

    Hi dears

    I am a beginner in VBA and I am asking for your kind help

    I have two sheets of a workbook in excel with a following problem:

    In the first sheet "input-output" I have 3 input variables in 3 columns (input1, input2, input3, each has 200 rows) and 2 output variables (output1, output2, each has to be filled with 200 results). The three inputs must be copied into the second sheet, which is a "blackbox" type of sheet, with about 30 formulas which yield 2 output variables. These 2 must be copied back into the two output columns.

    This has to be repeated 200 times (looped, I suppose) till all output values have been filled. This must some sort of loop which goes back and forth between the 2 sheets. In the "input-output" sheet input and output cells are at same corresponding heights (rows), whereas in the "blackbox" sheet, 3 inputs and 2 outputs are at fixed cells.

    Can someone write out the code? Thanks in advance

  2. #2
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Problem which requires looping back and forth between 2 sheets of a workbook

    Hi Nepremostivi & welcome to the forum,

    You would get better responses if you attach file with the current layout of your data structure & the expected results (do few rows manually). Just follow the instructions in the yellow banner at the top of the page on how to attach an excel file

  3. #3
    Registered User
    Join Date
    04-02-2021
    Location
    Doha, Qatar
    MS-Off Ver
    Excel 2016, 32-bit
    Posts
    2

    Re: Problem which requires looping back and forth between 2 sheets of a workbook

    dear nankw83

    Thanks for the instruction. Sample excel file attached.
    Attached Files Attached Files

  4. #4
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Problem which requires looping back and forth between 2 sheets of a workbook

    Try below code
    Please Login or Register  to view this content.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Problem which requires looping back and forth between 2 sheets of a workbook

    (removed as too late)

  6. #6
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Problem which requires looping back and forth between 2 sheets of a workbook

    Thanks Nepremostivi for the added Rep+

    If the provided solution takes care of your question, please take a moment & mark the thread as [SOLVED] from the Thread Tools above your first post

+ 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] looping through specific sheets in workbook
    By barrowinfurnace in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2018, 03:25 PM
  2. Problem looping thru worksheets in a workbook..
    By Hondahawkrider in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-06-2015, 03:26 PM
  3. Replies: 1
    Last Post: 10-04-2013, 04:21 AM
  4. Problem with a Chart when looping through sheets
    By jcaskey in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-06-2013, 07:57 AM
  5. looping thru all sheets within a workbook
    By sienahoops in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-16-2013, 05:24 PM
  6. Looping through a workbook with sheets and charts
    By Masact in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2009, 05:59 PM
  7. Looping a column in workbook 1 to workbook 2's sheets
    By L. Howard Kittle in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-15-2006, 11:15 AM

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.6.0 RC 1