skip to Main Content

Refer to this file https://docs.google.com/spreadsheets/d/1tVuhFYKXCFXjYTVncfOW79uBo55qhEI6BhdUOkZegOU/edit#gid=79825211

The first sheet has shopify export of my product which has a product handle in column A and tags in column G. The second sheet is a list of handles and tags.

Now I want to check against sheet 2 if the handle is present in sheet 1, append the tag of that row in sheet 1 against the same handle.

for eg, if handle carbon-fiber-antenna is present in sheet 1’s handle column, then the tag 20071 SeriesE81 will be added to tags already present in sheet 1 like: interir, exterior, 20071 SeriesE81

The main motive is to add tags to all products so I can import it back to shopify.

I am not able to think of anything

2

Answers


  1. Put this formula in cell products_export_1 (12)!BC1:

    =map(A2:A, G2:G, lambda(handle, tags, 
      if(len(handle) * len(tags), 
        let( 
          newTags, filter( 
            k!B$2:B, 
            len(k!A$2:A), 
            k!A$2:A = handle, 
            iserror(search(", " & k!B$2:B & ",", ", " & G2 & ",")) 
          ), 
          textjoin(", ", true, tags, ifna(newTags)) 
        ), 
        iferror(ø) 
      ) 
    ))
    

    You can then overwrite the original tags in column G2:G with these augmented values using Edit > Paste special > Paste values only and remove the formula.

    Login or Signup to reply.
  2. Try This, It will update the "Tags" column (G) in Sheet 1 with the original tags appended with any matching tags from Sheet 2. For handles not found in Sheet 2, the original tags remain unchanged.

    =CONCATENATE(G2:G,", ",XLOOKUP(A2:A,B2:B,C2:C,", "))
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search