A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Yes it helps a lot. For the fixed part of Textline the third argument will be 24 as the Notes
field is 25 so extra commas are OK. I will have to use the row 1 values as a better mapping tool to the Address fields and I think divide the truly variable portion of Textline into multiple splits to achieve what I want. I've outlined data examples below, so a decently quick read should enable you to say yay or nay. Thanks.
I apologize for the crappy problem statement, but I was not able to communicate the essence of the problem.
Sadly, the "complexity" of the data determines how Google exports it and how excel opens the .csv exported file. let's try a simple no-problem situation, an "easy" problem, and then the worst that I see by explanation. The row 1 literal text values are FIXED and put there by Google.
Simple No-problem: row 1 of exported file, followed by 1 data row out of say, 50 'name data' rows.
Name,FldA,FldB,Notes,Address Type,Address Formatted
Neal,,,A simple text note,Home,123 Main St City NY 12345
Note: this one is so simple that when Excel opens the .csv, the data IS ALREADY put into columns and my macro has a lot less work to do.
the Ubound of row 1 is 5 after the split. Row1UBnd = 5
splitting a name data row gives same UBound, so I KNOW there are no extra commas.
------end of simple no problem -----------------------------
Simple Problem: All of the data is in column A. Same row 1, after the spitting, same UBound of 5.
Name,FldA,FldB,Notes,Address Type,Address Formatted
The Mary data row is bad due to the embeded comma in the Note and the Address, say the string is in cell A27. Google bookends a bad field with " and "
3 would be the third argument in the Textline below, and (3) would contain the note AND the address type and address data, but I can find this easily by looking for " as the 1st character of (3) and then looking for the " to its right. I think I should be able to use the row 1 data to figure out what the (#) index values are for the data in the Worst case below. Cetainly worth a try.
Mary,,,"This note, has a comma in it.",Home,"456 Elm St XXXX, MA 02489"
The goal is to allow a note of: This note, has a comma in it. to flow downstream.
The goal is to allow an address of: 456 Elm St XXXX, MA 02489 to flow downstream
The Worst case is just more data over more rows. A solution to the above problem will work for the worst case data below.
Worst Case: Row 1 has a UBound of 66, there are 700 names,
The actual address portions of the row 1 data is:
Address # 1 - Type,Address # 1 - Formatted,Address # 2 - Type,Address # 2 - Formatted,,Address # 3 - Type,Address # 3 - Formatted
The data for 1 name can use up to 5-6 excel rows in the way Google writes it.
The challenge here is that i'll have to concatenate more than one row or count differently to know when the data for (25), the notes data ends.
Albatross,,,,,,,,,,,,,,,,,,,,,,,,,"this note text is two paragraphs, and uses 5 Excel rows to hold it
xxx,
xxx,
xxx,
xxx",other fields,Home,"123 Street
Kalamazoo, MI,
12345-1234", more address stuff here, rest of Google record here