Extract rows from range

Svgmassive

Board Regular
Joined
Nov 2, 2010
Messages
113
Is there a function/formula that will allow the extraction of only the row in the range below? thanks

Sheet1!$F$6,Sheet1!$F$10,Sheet1!$F$15,Sheet1!$F$19,Sheet1!$F$22
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi

I'm afraid I don't understand the question - unless do you mean you have these ranges in a VBA variable and want to return the Row?

Code:
Dim r As Range
 
Set r = Range("F6")
 
Msgbox r.Row
 
Upvote 0
i am trying to have a dynamic range offset to a different column based on another dynamic range.I am trying to get away from using vba.The original name is empid.Empid range is.
=Sheet1!$F$5,Sheet1!$F$7:$F$9,Sheet1!$F$11,Sheet1!$F$13:$F$14,Sheet1!$F$16:$F$18,Sheet1!$F$20:$F$21

can this be done?

=OFFSET(empid,1,1,1)
 
Upvote 0
Hi

Yes, you can BUT I would be inclined to specify the width as well because you may get unpredictable results.

Reason being I trialled your statement on a dynamic range specified using Offset and CountA and it gave me the 19th element on row 2 of a 21 column range!

hth
 
Upvote 0
Your formula -
=OFFSET(Range,rows,columns,height)

My formula -
=OFFSET(Range,rows,columns,height,width)

refer to Excel Help if you require further clarification.
 
Upvote 0
Hi

This seems to possibly achieve what you require -
Code:
=OFFSET(INDEX(empid,1,,2),,6,1)

which will give you the cell at 6 columns offset in row 2 of your non-contiguous range.

Use the Areas option of Index to specify the number of the element in your dynamic range

hth
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,822
Members
452,946
Latest member
JoseDavid

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
Back
Top