I apologize, I thought Paul's solution was enough, but as you noted I overlooked the need to reset r & c when a new named range appears.
I threw together a quick sample file, I believe this should have enough data but let me know if this is adequate or not. In the file, there are 4 named cells and 2 named ranges. For some reason I was unable to attach a text document, but if you just run the first sub (test), it should provide you with a text file using whatever info is currently in the named cells that you can use for the input sub.