• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

use values in column A as variables and values in column B as input

Mario78

New Member
hi all

hope someone can help me with this:

I have a varying number of cell values in column A.

Each of the cell values in column A - starting in cell A5 - represent a variable called strFieldNames

below variables 1 to 11 are hard coded.


'Set the required field names in the PDF form.
strFieldNames(1) = "First Name"
strFieldNames(2) = "Last Name"
strFieldNames(3) = "Street Address"
strFieldNames(4) = "City"
strFieldNames(5) = "State"
strFieldNames(6) = "Zip Code"
strFieldNames(7) = "Country"
strFieldNames(8) = "E-mail"
strFieldNames(9) = "Phone Number"
strFieldNames(10) = "Type Of Registration"
strFieldNames(11) = "Previous Attendee"


I would like to have a code which covers an varying number of variables in column A. Not hard coded.

later I need to go through every single variable and do something with every variable.

my problem is that the above example limits the variables to 11 and their names do not change.

in other words I need a code that sez:

for all the variables found in A5 to A22, A23 or whatever, take the value which is one cell to the right in column B and do something.


any thanks for any input
 
Back
Top