+ Reply to Thread
Results 1 to 3 of 3

Passing data to Excel function

  1. #1
    Registered User
    Join Date
    06-10-2021
    Location
    CZ
    MS-Off Ver
    365
    Posts
    2

    Passing data to Excel function

    Hi, I got code generator programmed in Excel and I would like pass different data to these same functions (similar like calling function with arguments).

    For example I have this simple generator and I would like to pass different data to Input1 and Input2 from some textlist.
    {8C9AF32A-D224-4A9D-ADE5-ECDE460B7D8B}.png

    I could just copy it numerous times, but it would we too time consuming and also if I need to change code, I would have to change it in every function.
    {4D67590B-C1FC-47C7-B25D-FFE7F8E67192}.png

    Can you point me to direction, which I should take? Thanks

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Passing data to Excel function

    Hi, and welcome to the forum.

    This is clearly a much simplified example and probably doesn't represent the size of your actual data. We often find that when we give an answer to what is a trivial non representative example when the solution is used with the real world data it doesn't work because of factors like string length, different permutations or different sized ranges and other stuff which is important but hasn't been mentioned.

    Therefore upload your real workbook (or at least a cut down copy), and manually add the results you expect to see. Clearly identify which is original data and which are the results and in a note clearly explain how you have arrived at your results.

    That said if the original data is in A1:C3 why not just enter in A4

    =A1

    and copy that down as far as you need and across to column C
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    06-10-2021
    Location
    CZ
    MS-Off Ver
    365
    Posts
    2

    Re: Passing data to Excel function

    Hi Richard, yes I understand that it's very simplified example.

    I already found pretty decent way how to do it. I just made simple macro, which copies source data to generator sheet, then copy the results to output sheet. All done in For loop.

    {87A40B86-7330-49FC-A4D6-C33EE1D85DF6}.png
    Last edited by PetrBr; 06-10-2021 at 07:54 AM.

+ 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. Passing Data from Excel to Sharepoint
    By NWoodgerd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2013, 06:05 PM
  2. passing/return a user data type from function
    By david90 in forum Excel General
    Replies: 0
    Last Post: 09-21-2011, 12:54 PM
  3. Passing Data from Excel to PowerPoint via VBS?
    By kpierce in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-03-2011, 03:05 AM
  4. Run a Macro in Visio from Excel by passing Data
    By tomlancaster in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2009, 06:35 AM
  5. Passing data to excel on open
    By Fred in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-03-2006, 03:40 AM
  6. Passing arguments into function to bring data array from closed wb
    By Peter Rooney in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-08-2006, 10:55 AM
  7. Passing a range of data to a function - Excel - visual basic
    By dochoa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-02-2006, 04:15 PM
  8. Passing array from Access to Excel function
    By Dale in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-29-2005, 03:05 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