define cell

ealtmann

New Member
Joined
Jul 12, 2006
Messages
6
In cell N10 is the name of the first item. i now have the following cells defined:

name=$N10
volume =$N11
type=$N12

A VBA macro, than uses these defined names, to calculate several formulas, this all works fine.

But know i want add more items , every 15 rows should have the same defined names
so in cell $N$26 is the name of second item
so name should refer to cells $N10 and $N26 and $N41
, $56 (so every 15 rows)
the same goes for volume and type.

Is there a function to define this?

thanks!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

tmcfadden

Board Regular
Joined
Aug 17, 2005
Messages
151
If I understand you correctly, you want to define a bunch of cells to a single named range.

I just used "Record Macro" to define a range. It came up with:
Code:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 10/17/2006 by t
'

'
    ActiveWorkbook.Names.Add Name:="name", RefersToR1C1:= _
        "=Sheet1!R1C1,Sheet1!R4C1,Sheet1!R7C1,Sheet1!R10C1,Sheet1!R13C1,Sheet1!R16C1"
End Sub

This could easily be modified for your purpose.

-Tim
 

Forum statistics

Threads
1,136,878
Messages
5,678,305
Members
419,753
Latest member
Sallylwy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top