Placeholder

Customer Forum

Importing multi-select values - a tip

Workbooks Support Posted: 2011-11-09 16:52

If you are importing into a multi-select picklist field - something which contains comma-separated items within a single field - you need to consider how to build the values for that field.  

For an example consider a multi-select picklist which accepts the values (blank), "Magazine", "Web", or "Magazine,Web".

Starting in Excel you typically have a series of cells with 'Yes/No' values. So you have a column called 'Magazine' which is column C and another column called 'Web' which is column D. We need to end up with a column containing the multi-select value.

To make this simple create two columns just to the right of the existing columns.

The first column (column E) is filled with the formula: 

=CONCATENATE(IF(ISBLANK(C2),"","Magazine,"), IF(ISBLANK(D2),"","Web,"))


It's easier to understand if I re-write it like this although you need to enter it as above:

 

=CONCATENATE(
  IF(ISBLANK(C2),"","Magazine,"),

  IF(ISBLANK(D2),"","Web,")

)

 

and so on down the worksheet - use the cross at the bottom-right of the formula-containing cell and drag it down the sheet to copy it.

 

The second column takes the values in column E and removes the last character to get rid of a trailing comma:

 

=IF(LEN(E2) >0,LEFT(E2,LEN(E2)-1),"")


Again, apply this to all the rows.

Finally use the Search-and-replace tool in Excel to replace any instance of two consecutive commas with a single comma.

Your data is now in an importable format.