Reference a cell in a named range

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
say the range is 45,55,65

you want to find the value in the second cell in the range ?
 
Upvote 0
Maybe
Code:
Sub chk()
MsgBox Range("myrng").Cells(3, 1).Value
End Sub
 
Upvote 0
I have multiple events sequenced throughout the day, each with a start time and and an end time. I need to calculate the delay between when one event ended and the next event started.

In the table below, I have named ranges called "StartTime", "EndTime" and "Delay". I need to create a formula that subtracts the end time of event#1 from the start time of Event#2. It's easy if I use Row/column references. But when I use Named ranges, I need to be able to identify a particular cell with a named range.

For example, if I could use a cell name such as "StartTime1" to identify the column as "StartTime" and the row as "1", that would address my problem.

Hope this makes sense.
Thanks for your help.
Jim


Event Start Time End Time Delay

Event#1 10:00 11:00 N/A
Event#2 11:05 11:30 0:05
Event#3 11:45 12:00 0:15
 
Upvote 0
Sorry, the table didn't display well at all. I'll try pasting a table

Jim


Event StarTime EndTime Delay
1 10:00 11:00 N/A
2 11:05 11:15 0:05
3 11:30 12:10 0:15

<colgroup><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
I think I would just use the cell references as the formula is much simpler, but would this suffice if you really want to use the named ranges?
D2 would house a manual "N/A"
D3 copied down.

Excel Workbook
ABCD
1EventStarTimeEndTimeDelay
2110:0011:00N/A
3211:0511:150:05
4311:3012:100:15
Delay
 
Last edited:
Upvote 0
I think I would just use the cell references as the formula is much simpler, but would this suffice if you really want to use the named ranges?
D2 would house a manual "N/A"
D3 copied down.

Delay

ABCD
1EventStarTimeEndTimeDelay
2110:0011:00N/A
3211:0511:150:05
4311:3012:100:15

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:51px;"><col style="width:71px;"><col style="width:70px;"><col style="width:52px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
D3=INDEX(StartTime,ROWS(D$1:D3)-1)-INDEX(EndTime,ROWS(D$1:D3)-2)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4

Hi,

I agree, it's not worth using named ranges if that's what's required to reference a specific cell within a range.

Thank you for you help.
Jim
 
Upvote 0

Forum statistics

Threads
1,216,089
Messages
6,128,760
Members
449,466
Latest member
Peter Juhnke

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