View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default VBA-Beginner Question

I'm not sure what you're doing, but maybe you could use the column with the
activecell in it?

Or if your data always has standard headers (that never, ever vary), then you
can search for that header and use that column.

Or maybe you could just use the rightmost column????

Toria wrote:

Hello,
I do not know VBA. The macros I've created over the years were just recorded
in Excel to shorten the time to format. I now need to create a macro on a
spreadsheet that sometimes have 2 more or 2 less columns. I won't be
reporting on those extra columns but I can't have my macro calculate on
column F if sometimes what I really needed is column H (this macro is for
many users so we won't know if their spreadsheet has those extra columns). Do
I need to name ranges or do something else for my macro to work and make
sense?

Thank you!


--

Dave Peterson