Equidistant Letter Sequence with Excel VBA

cairo95

Board Regular
Joined
Dec 11, 2007
Messages
91
Hello,

i am looking for a looping VBA code that loops through a 2 dimensional array...lets say with 9 rows and 17 columns (label name Area1)....i would like to designate the character number to start (like start at the first character) then to skip x amount of characters and print the character in between the skipped characters....then start with the next character after the printed character and so forth...looping until the number of character print is completed (9x17 = 153 characters max) i would like the characters printed in the same array size (9x17). next to area1.


Enter start point, enter skip amount
loop through the array and print next value
I have attached an image example.

thanks in advance!
Rene
 

Attachments

  • Equidistance Letter Squence Excel VBA Sample image.jpg
    Equidistance Letter Squence Excel VBA Sample image.jpg
    201.8 KB · Views: 23
How did you find the sentences solution - just by trial and error with the 2 variables?

Two further things to consider
  1. Investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with. We can't copy anything from an image like you posted.

  2. Update your Excel version as i suggested in post #16. After all, IF you have Microsoft 365 you might consider solving this puzzle with worksheet formulas rather than vba with one of these formulas.
Cell Formulas
RangeFormula
W11W11=LET(t,CONCAT(E2:U10),n,LEN(t),CONCAT(MID(t,MOD(SEQUENCE(n,,B3-1,C3+1),n)+1,1)))
W12W12=LET(t,CONCAT(E2:U10),n,LEN(t),TEXTJOIN(" ",1,MID(t,MOD(SEQUENCE(n,,B3-1,C3+1),n)+1,1)))
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
thank you for the suggestions! yes, a colleague of mine said this is a 340 character cipher with 3 parts from the Zodiac killer (it was an Aussie who originally solve it!) that was recently solved but we didnt know how...we wanted to see if the ELS theory held up and it appears it has... with a few tweaks...there are many misspellings so it is hard to do this manually ....i will add a macro to match the sentences for the final output.

thanks again!
Rene
 
Upvote 0

Forum statistics

Threads
1,215,455
Messages
6,124,938
Members
449,197
Latest member
k_bs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top