Using Excel to count items of differing values.

  Robbo99 12:44 19 Mar 06
Locked

I am counting bags of money. They have differing values. I have a column in which the value of the bags is shown. There are varying numbers of bags of each value. For instance, I might have 2x£100 and 2x£50. This will appear in my column as 100, 100, blank cell, blank cell, blank cell, 50, 50, more blank cells. The blank cells would contain an entry if I had more bags.
What I want to do is have excel allocate a consecutive number to each bag. The numbers will appear in a column next to the first column. In the example above, bags 1 & 2 would be £100 and bags 3 & 4 would be £50. On another day I might have three £100 bags, so I would need bags 1,2 &3 to be allocated against the £100 cells, and bags 5 & 6 to the £50 cells. ETC. So I need excel to count and allocate numbers only to those cells that have a value in them, and ignore the blank cells which will vary from day to day. How can I do this?

  VoG II 13:06 19 Mar 06

Assuming that your £values (or blanks) are in Column A starting at Row 1 then in another column in Row 1 enter the formula

=IF(A1<>"",COUNT($A$1:A1),"")

Then hold the cursor over the bottom right of that cell until the pointer changes to a +, hold down the left mouse button and drag the formula down as far as needed.

  Robbo99 10:13 20 Mar 06

Thanks for the formula Vog.

This thread is now locked and can not be replied to.

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

The updated 'Corel Painter inside Photoshop' plugin ParticleShop offers new brushes

New MacBook Pro 2017 release date, UK price and tech specs: Kaby Lake MacBook Pro to launch in…