Need help for my arduino project PLEASE ANYONE!

Ok I'll try using the code you gave me. And I kind of have to use 5 analog inputs and 5 digital inputs because I'm going to be limited on the number of digital pins because I'm using the arduino to light up 24 different lights using 3 shift registers. Just wondering so you think this whole conceppt will be possible. You know having the 5 rows as analog pins and having the 5 columns be digital pins and then each separate pair toggling a unique?