ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   For Loop (https://www.excelbanter.com/excel-programming/429267-loop.html)

Excel User[_2_]

For Loop
 
Hi,

I'm hoping someone can help, I have an output from a file:

{"forename":["Forname1","forname2"],"surname":["Surname2","surname2"],"dateOfBirth":["04\/07\/1970","05
\/27\/2009"]}

I would like to convert this into a loop

array1 = "forename1", "surname1", "04\/07\/1970"
array2 = "forename2", "surname2", "05 \/27\/2009"
etc

for each x
'do something
next

I don't mind skipping creating the arrays but don't know who to do this?

Thanks


Howard31[_3_]

For Loop
 
How exactly does the pattern of the file output work? Is there something
that identifies parts that you want separated into different arrays?

"Excel User" wrote in message
...
Hi,

I'm hoping someone can help, I have an output from a file:

{"forename":["Forname1","forname2"],"surname":["Surname2","surname2"],"dateOfBirth":["04\/07\/1970","05
\/27\/2009"]}

I would like to convert this into a loop

array1 = "forename1", "surname1", "04\/07\/1970"
array2 = "forename2", "surname2", "05 \/27\/2009"
etc

for each x
'do something
next

I don't mind skipping creating the arrays but don't know who to do this?

Thanks



Excel User[_2_]

For Loop
 
Howard,

forename is the header
surname is a header
as is dateOfBirth

then the values are each a

1st set
forename1, surname1, 04\/07\/1970
2nd set
forename2, surname2, 05\/27\/2009
etc

Thanks

"Howard31" wrote in message
...
How exactly does the pattern of the file output work? Is there something
that identifies parts that you want separated into different arrays?

"Excel User" wrote in message
...
Hi,

I'm hoping someone can help, I have an output from a file:

{"forename":["Forname1","forname2"],"surname":["Surname2","surname2"],"dateOfBirth":["04\/07\/1970","05
\/27\/2009"]}

I would like to convert this into a loop

array1 = "forename1", "surname1", "04\/07\/1970"
array2 = "forename2", "surname2", "05 \/27\/2009"
etc

for each x
'do something
next

I don't mind skipping creating the arrays but don't know who to do this?

Thanks




All times are GMT +1. The time now is 07:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com