skip to Main Content

I need to generate hundreds of unique products into a sheet with currently only 14 products. In the ‘handle’ column if you add a random number to the name/string this will be enough to generate a new product in a Shopify database once you reimport the CSV into the database.

To generate a random product ‘handle’ I add this formula:

=JOIN("-","dress",RANDBETWEEN(1,1000) )

But I don’t want to manually type the string portion ‘dress‘ into the formula. Is there a function to grab the current contents of the cell

2

Answers


  1. try simple:

    =JOIN("-", A1, RANDBETWEEN(1, 1000))
    

    where A1 = “dress”


    for array/range do it like this:

    =ARRAYFORMULA(A1:A10&"-"&RANDBETWEEN(ROW(A1:A10), 1000))
    
    Login or Signup to reply.
  2. I am not entirely clear of your requirement but suggest an alternative to your formula:

    =A1&"-"&B1
    

    assuming “dress” is in A1 (and similar values below it) and that B1 is populated with:

    =randbetween(1,1000)
    

    and that is copied down to suit before the whole column is copied and Paste special, Paste values only over the top. This would facilitate the removal of duplicates (if desired) and provide an audit trail while reducing processing requirements.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search