+ Reply to Thread
Results 1 to 4 of 4

Dynamic Variable identification

  1. #1
    Registered User
    Join Date
    05-21-2012
    Location
    Pittsburgh, Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    6

    Question Dynamic Variable identification

    Hi -

    I am working on a project that sorts through data based on the headers located in the first row of the sheet. I need to be able to find values "source", "destination", and "totalbytes" and use the information in that column based on finding the header value. Once I find the column, I then need to be able to run a series of formulas against the columns values. Is this possible?

    Thanks for the help. Let me know if anyone wants a sample set of data.

  2. #2
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Dynamic Variable identification

    This function returns the column number of the specified column header, or 0 if not found:
    Please Login or Register  to view this content.
    Call it like this:
    Please Login or Register  to view this content.
    and use columnNumber in your code.
    Post responsibly. Search for excelforum.com

  3. #3
    Registered User
    Join Date
    05-21-2012
    Location
    Pittsburgh, Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Dynamic Variable identification

    Great! Thanks! I'll test it a bit and let you know how it goes.

  4. #4
    Registered User
    Join Date
    05-21-2012
    Location
    Pittsburgh, Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Dynamic Variable identification

    Ok, the code returns the value for the column as expected. I have run into another problem though. I want to assign the value to a variable and use it in various calculations. Here is what I have tried...

    Please Login or Register  to view this content.
    returns error "Wrong number of arguments or invalid property assignment"
    Last edited by Cutter; 07-20-2012 at 09:39 PM. Reason: Added code tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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