Forum

Notifications
Clear all

Allocate a number to Ranges of numbers

3 Posts
2 Users
0 Reactions
92 Views
(@blackvan)
Posts: 30
Trusted Member
Topic starter
 

I need to allocate a sequential number to sets of numbers as follows:

Suppose A1 to A24 contain the consecutive numbers 1 to 24.

In Col B I need to allocate an integer to each number within consecutive groups of eight numbers, so that each number in Col A from 1 to 8 is allocated the number 1, each number from 9 to 18 is allocated the number 2, etc.

See the attached example sheet.

What formula do I need in B1 to copy down?

I've tried various combos of quotient, roundup and ceiling but can't get it to work properly, especially at the boundaries.

Thanks!

 
Posted : 22/06/2024 11:59 pm
Riny van Eekelen
(@riny)
Posts: 1188
Member Moderator
 

In B1, enter

=INT((A1-1)/8)+1

or

=INT((ROW()-1)/8)+1

and copy it down. Have added these to your file, plus one extra in case the sequence is not numerical AND doesn't start on row 1.

 
Posted : 24/06/2024 12:31 am
(@blackvan)
Posts: 30
Trusted Member
Topic starter
 

Thanks Riny, you're a champ!

 
Posted : 25/06/2024 12:45 am
Share: