View Single Post
 
Old 08-28-2022, 07:54 AM
ksor ksor is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: Feb 2018
Location: Århus V, Denmark
Posts: 78
ksor is on a distinguished road
Default Missing formula OR VBA code ??

I have attached a Excel sheet with a little ridle I cant solve !


The Knr yellow columb to the left contains a 1 CHAIN of digits 1..10 if you 'follow' the pointer columb to the right:


Knr=1 'points' to Knr=2
Knr=2 'points' to Knr=3
.
.
.
.
Knr=9 'points' to Knr=10
Knr=10 'points' to Knr=1 linking back to Knr=1


and a CHAIN is made up of 10 links!


This CHAIN can be cut into smaller chains by ADDING a number to Knr and you'll get Knr' - try replace the 0 with a number ... lets say 1 !


Then you'll get 10 chains each with only 1 link !


If you replace 0 with 2 you'll get 1 chain with 10 links


If you replace 0 with 3 you'l get 2 chains with 5 links each.


I need a FORMULA

OR



some VBA code that can tell me how many chains the is in the Knr' columb

when you add a number to Knr !


I think I'll have to SELECT the range C8:17 first !


Do you have any ideas how this could be done ?
Attached Files
File Type: xlsx Forum.xlsx (10.6 KB, 13 views)
Reply With Quote