Named Range formula questions

F

Fastbike

I am new to Excel VBA, (after my boss told me I am the new
programmer!!!), so I have a few questions for anyone who can answer.
I have a spread sheet with dynamic columns and rows.
I am trying to used named ranges for references in the sheet. (Columns
and Rows)
I am after examples of formulas using named ranges for the following:
- How do I SUM BETWEEN ranges in VBA?
- How do I create a LOOP to stop at a RANGE ROW? E.g. Sum of A1:A2,then
B1:B2, C1:C2 etc. Stopping at "E:E" (which is a named range column)

Anyhelp would be greatly appreciated.
 
F

Fastbike

Hi Conrad,
thank you for the time on the answer you sent me. It is reall
appreciated and I will see how I can fit in the advice today at work.

I will answer a few of your question:

1. My columns and rows are changing in this speadsheet. I have a pivo
table macro that generates this spreadsheet report that I need to edit
The problem is that I will get more or less columns and rows dependin
on the fields in the report.

2. You are right about the "Sum Between" question. The reason I nee
this is that I have sub totals to calculate in the spreadsheet. Becaus
the cells where the subtotals will go may move depending on the pivo
table report, I need to have this calculated dynamically. The proble
is that I can not designate a range in VBA as the range "moves
according to the report. Having looked at your answer I may be able t
assign a range or a point of reference between two cells and use tha
to make my calculations.

Once again thanks for the help. I will let you know how it all work
out and send a sample of the code I used in the next few days.
PS. Don't laugh at the code. Like I said, I am a beginner. :)

Fastbik
 
Top