Closed Thread
Results 1 to 2 of 2

indirect funtion

  1. #1
    Registered User
    Join Date
    11-24-2006
    Posts
    3

    indirect funtion

    im trying to use the indirect funtion as described below. what im trying to do is complicated, below is just a simplified version:

    say cell a1=2 and cell a2=3
    the values of cell b1 is "a1" and b2 is "a2"
    so i want to use the indirect funtion to get the average of 2 and 3
    this is what i type: indirect("average("&b1&":"&b2&")"). this should translate into average(a1:a2).

    this just gives back a cell reference error. is there a mistake in my syntax, cos i cant see one!

  2. #2
    all4excel
    Guest

    Question Average(indirect(b1&":"&b2))

    Quote Originally Posted by dannymc
    im trying to use the indirect funtion as described below. what im trying to do is complicated, below is just a simplified version:

    say cell a1=2 and cell a2=3
    the values of cell b1 is "a1" and b2 is "a2"
    so i want to use the indirect funtion to get the average of 2 and 3
    this is what i type: indirect("average("&b1&":"&b2&")"). this should translate into average(a1:a2).

    this just gives back a cell reference error. is there a mistake in my syntax, cos i cant see one!

    USE the iNDIRECT funtion this way ,u have to always use the indirect function inside any other function and not indirect outside the parentheses
    (brackets)

    2 a1
    3 a2

    AVERAGE 2.5
    FORMULA-- AVERAGE(INDIRECT(B1&":"&B2))

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Thread closed as cross post. If you agree to the rules below PM me and I will remove the lock

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1