Please help with a quandry of relative referencing and macro development.

I have a spreadsheet with a varying number of columns, possibly a hundred columns or more. Each cell 1 of a column contains a name, which should also be the range name of cells 2 through 1000 of that column.

I would like to create a macro that checks cell 1 of column B for a name, then selects cells B2 - B1000 and names the range the same name as cell B1, then moves to the next column, does the same thing repetitively until it reaches a blank column.

I've got a handle on the looping, but the relative referencing has me stumped.

Any help would be appreciated. Thanks in advance.