rubbis_with_excel
New Member
- Joined
- Jan 19, 2004
- Messages
- 28
Hi,
I've been looking for some code or a formula to count surrounding cells with the same value. I've found some examples, but I need something a bit more complex so I was hoping someone clever here can help me.
I'm developing a silly little game and I want to be able to recognise the whole surrounding block of same-value cells
Using the example below, I want to be able to recognise/count the lower block of A's and delete them, but not the row of A's at the top (I hope that makes sense!).
A A A A
B B C C
B A A B C
B A A A B C
B A A A A B
Every code or formula I've found either doesn't pick up enough of the A's or finds absolutely everything!
Any help would be appreciated, thanks
I've been looking for some code or a formula to count surrounding cells with the same value. I've found some examples, but I need something a bit more complex so I was hoping someone clever here can help me.
I'm developing a silly little game and I want to be able to recognise the whole surrounding block of same-value cells
Using the example below, I want to be able to recognise/count the lower block of A's and delete them, but not the row of A's at the top (I hope that makes sense!).
A A A A
B B C C
B A A B C
B A A A B C
B A A A A B
Every code or formula I've found either doesn't pick up enough of the A's or finds absolutely everything!
Any help would be appreciated, thanks