Nirbhay Sharma
New Member
Hi everyone
So I am having an excel file with some data in it. see sample file.
now i want to achieve the following:
- check for the number of products bought by a customer.
- after obtaining that, we have to create that many records for the customer.
- example: john has bought 5 suitcases and 2 wallets. then there will be two rows for john.
- also we will populate the "product qty" columns with the respective product values.
example: for john, there would be two rows. one row will have the values 5 in product qty and other will have 2.
i have so far tried to obtain the number of copies that are required by applying this formula in column J; =COUNTIF(F2:H2,">"&0)-1
also i have applied this formula to get which value has to be copied in the product qty column (if there are more than one copies req.)
is there any macro or any way someone can suggest to implement this logic?
thanks in advance![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
So I am having an excel file with some data in it. see sample file.
now i want to achieve the following:
- check for the number of products bought by a customer.
- after obtaining that, we have to create that many records for the customer.
- example: john has bought 5 suitcases and 2 wallets. then there will be two rows for john.
- also we will populate the "product qty" columns with the respective product values.
example: for john, there would be two rows. one row will have the values 5 in product qty and other will have 2.
i have so far tried to obtain the number of copies that are required by applying this formula in column J; =COUNTIF(F2:H2,">"&0)-1
also i have applied this formula to get which value has to be copied in the product qty column (if there are more than one copies req.)
is there any macro or any way someone can suggest to implement this logic?
thanks in advance