Question: So I have this code:

```
def myprogram():
import string
import random
import getpass

inputpasswd = getpass.getpass("Password: ")
passwd = ("I<3StackOverflow")
if passwd == inputpasswd:
    qwerty = input("Type something: ")
    def add_str(lst):
        _letters = ("1","2","3","4","5","6","7","8","9","0","q","w","e","r","t","z","u","i","o","p","a","s","d","f","g","h","j","k","l","y","x","c","v","b","n","m","!","#","$","%","&","/","(",")","=","?","*","+","_","-",";"," ")
        return [''.join(random.sample(set(_letters), 1)) + letter + ''.join(random.sample(set(_letters), 1))for letter in lst]

    print(''.join(add_str(qwerty)))
    input("")
else:
    print("Wrong password")
    input("")

```

My question is: How can I make an opposite program, so it accepts the bunch of junk letters and converts it to text that makes sense?

Example:
If I type something like "aaaaaaa" in this program it will convert it to something like "mapma&)at7ar8a2ga-ka\*"

In this new program I want to type "mapma&)at7ar8a2ga-ka\*" and get output "aaaaaaa".

Answer: 
In **A1** enter:

```
=AVERAGE(OFFSET(C$1,10*(ROW(1:1)-1),0,10))

```

and copy down

[![enter image description here](https://i.stack.imgur.com/dIGdV.png)](https://i.stack.imgur.com/dIGdV.png)

See:

[A.S.H.'s Answer](https://stackoverflow.com/questions/44745800/autofilling-a-formula-is-that-possible)

**EDIT#1:**

To average **Q2** through **Q11**, use:

```
=AVERAGE(OFFSET(Q$2,10*(ROW(1:1)-1),0,10))

```

and copy down
Use INDEX() to set the ranges. In A1:

```
=AVERAGE(INDEX(C:C,(ROW(1:1)-1)*10 + 1):INDEX(C:C,(ROW(1:1)-1)*10 + 10))

```

So B1 would be:

```
=INDEX(D:D,(ROW(1:1)-1)*10 + 1)

```

Copy/Drag both formulas down.

Advantages to this over OFFSET, OFFSET is Volatile and will recalculate every time that Excel recalculates whether the data changed or not. Where INDEX will only recalc if the data to which it refers changed or not. If used to many times it will make a difference in the calc times.

Advantage to OFFSET, it is shorter and if used in moderation will not have a noticeable effect on the calc time, so it will save some wear and tear on the fingers.