Autofill a column according to values in another column [Closed]


I need to autofill a column according to certain data in another column
It goes like this

Column B contains various data including a value "x"
I need to number column A according to B,
so if B contains {4,5,23,5,24,x,12,57,34,63,x,12,45,6345,634,3234,x} column A should contain {1,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,3} and so on

I am completely new to excel and have started reading some stuff regarding it but my work at office has a time limit

Help at the earliest would be really appreciated
  • using excel 2013*

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!