Forum Discussion

kcb410's avatar
kcb410
Copper Contributor
Feb 06, 2019
Solved

Sorting Ecommerce Option Values

Hello Everyone,

 

We've got an excel file from our eCommerce site with 10,000 rows of option values sorted by the product ID. There are multiple rows for each product ID but the number of rows for product ID each varies. We would like to insert a 1 in a new row / column every time the product ID changes.

 

Is there a formula we could use to do this?

 

I've attached a screen shot.

 

Any help would be appreciated. Thanks.

  • Hi,

     

    You may use in A2

    =IF(B1=B2,"",1)

    select column A starting from A2 till end of your range and Ctrl+D

     

3 Replies

  • coleman788's avatar
    coleman788
    Copper Contributor

     

    Hi there!

    It sounds like you need to flag the first occurrence of each unique Product ID, which can be easily done with an Excel formula. You can use the following approach:

    1. Step 1: Sort your data by Product ID if it's not already sorted.

    2. Step 2: In a new column, use this formula to insert a "1" every time the Product ID changes:

      =IF(A2<>A1, 1, "")

      Where A2 refers to your Product ID column. This formula checks if the current row's Product ID is different from the previous row. If it's different, it returns a "1"; otherwise, it leaves the cell blank.

    3. Step 3: Copy the formula down for all rows.

    This should help you flag the first occurrence of each Product ID!


    If you're also exploring how to efficiently manage large datasets like this or other eCommerce operations, you might want to check out https://wifeybeauty.com/ Beauty. They specialize in integrating luxury beauty services and can offer insights on organizing operations effectively, especially in beauty eCommerce. 😊

    kcb410 

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    Hi,

     

    You may use in A2

    =IF(B1=B2,"",1)

    select column A starting from A2 till end of your range and Ctrl+D

     

Resources