ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to use worksheet function Index (https://www.excelbanter.com/excel-programming/390901-how-use-worksheet-function-index.html)

clara

How to use worksheet function Index
 
Hi al,

I have a named range called List (A1:A10) and I want to retrieve the second
item(A2) so the code is : worksheetfunction.index( "List", 2, 1), but I got
"Unable to get the index property of worksheetfunction class".

Clara
--
thank you so much for your help

CoRrRan

How to use worksheet function Index
 
clara wrote:
Hi al,

I have a named range called List (A1:A10) and I want to retrieve the second
item(A2) so the code is : worksheetfunction.index( "List", 2, 1), but I got
"Unable to get the index property of worksheetfunction class".

Clara


You will have to use a syntax like this:

WorksheetFunction.Index(ThisWorkbook.Names("List") .RefersToRange, 2, 1)

HTH, CoRrRan

[email protected]

How to use worksheet function Index
 
Hi
Use
worksheetfunction.index([list], 2, 1)

The square brackets returns the "value" of the name "List" i.e. the
range.

regards
Paul
On Jun 7, 4:07 pm, clara wrote:
Hi al,

I have a named range called List (A1:A10) and I want to retrieve the second
item(A2) so the code is : worksheetfunction.index( "List", 2, 1), but I got
"Unable to get the index property of worksheetfunction class".

Clara
--
thank you so much for your help





All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com