ANmaPairedStrings

Build pairs of lists of strings and returns both strings
Takes the worksheet, the column numbers for your two data sets, and the last row to process,
Then returns both built strings via ByRef parameters. For each row, it checks whether the value in the second column is blank after trimming whitespace;
If it is, that row is skipped completely, meaning the first column's value for that row never makes it into RettStr1 either.
If the second column has a value, both values get appended to their respective strings with a comma-space separator,
And the function avoids adding a leading comma before the first entry.
You have two columns of strings, you want to return list of strings from 1st column and list of strings from 2nd column only if both columns have values in them
This used to return the list of map columns, knowing that if user left cell in right column blank we are not going to return cell in left column either.
Ended with two list of matching number of strings, 1st from string1 to align to 1st of string2, 3rd to 3rd, etc.
To pass both strings to another function to do the import.

CodeFunctionName What is this?

Public

Tested

Original Work

Access is limited.

Login here using your Linkedin account. to see or download code.

No registration, not another password to remember, login using your Linkedin account and have access to all public codes in Bold.codes

Linkedin Login

ws As Worksheet, col1 As Long, col2 As Long, lastRow As Long, ByRef RettStr1 As String, ByRef RettStr2 As String, Optional Sepa = ","

Views 1

Downloads 0

CodeID
DB ID

Codes Required 0

Similar codes

Recent 4 by ANmarAmdeen 4

Random Codes 4