how to write code that if value is located in a range, then write text, however, write text for every time value appears in range. data example below on sheet1. on sheet2 I want to populate 'product sold' 3x since the ID of 10 appears on multiple lines (line2, line5, line6). Not sure how to do this.
Sheet1
A B
Line1 ID Text
Line2 10 product sold
Line3 11 product out
Line4 12 product discontinued
Line5 10 product sold
Line6 10 product sold
How I want Sheet2 to look. if sheet1 a2 to a6 = 10 then sheet2 = product sold, product sold is populated the number of times ID=10 is found on sheet1
A
Line1 Text
Line2 product sold
Line3 product sold
Line4 product sold