# indirect funtion

1. ## 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!  Register To Reply

2. ## Average(indirect(b1&":"&b2)) 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))  Register To Reply

3. Thread closed as cross post. If you agree to the rules below PM me and I will remove the lock

VBA Noob  Register To Reply