montrof
asked on
Add a Value for first value in Column
I need a macro that would assign a 1 to the first value and a 0 to each additional value that is the same. IE
Apple 1
Apple 0
Apple 0
Orange 1
Banana 1
kiwi 1
Banana 0
Searching Column E and Put the value in Column N start at row 2.
Thanks,
Montrof
Apple 1
Apple 0
Apple 0
Orange 1
Banana 1
kiwi 1
Banana 0
Searching Column E and Put the value in Column N start at row 2.
Thanks,
Montrof
@Rob
If I am not wrong, tt should be like this.....
If I am not wrong, tt should be like this.....
=IF(COUNTIF($E$2:$E2,$E2)=1,1,0)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This is perfect Thank you so much!!
You're welcome. Glad it worked as per your requirement. :)
Sktneer - correct, I omitted to offset by a row to count the cells above.
=IF(COUNTIF($E$2:$E2,$E2)=
Copied down as far as required.
Thanks
Rob H