Attempt 79/3/IV/A <bg>
=IF(COUNTA(E21:F21)<2,"",AVERAGE(INDEX(H:J,MATCH(A3,B:B,0),0)))
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my
addy)
Hi again, Bob.
If count(E21:F21)<>2 : If both cells are empty or any of them is
empty then nothing is shown in the cell G21 in SheetC.
What i want is:
1- The value in cell G21 in SheetC is:
a- has to match the lookup value in A3 from the sheet named Marks.
b- take three cells H,I,J and take the average and put it in G21
in the second sheet named SheetC.
Example:
In sheetC cell A3 has the name "Lora"
I have to go to sheet Marks and look for the line containing "Lora" in
colomn B (say 14) go to the numbers in colomn H, I, J (for "Lora" who
is in line 14) and take their average and put that value (aveage) in
sheetC in cell G21.
If the cells E & F (that are before G) any of them is empty then
nothing is displayed in cell G21.
Hope I made it clear
Note:
There are a few things here Khalil.
First, you have no alternative action if COUNT(E21:F21) <> 2.
You have no column in the VLOOKUP, the syntax is
VLOOKUP(lookup_val,lookup_table, lokkup_column,range_lookup).
Why AVERAGE the lookup_table, didn't notice that before, and it seems
odd to me.
You have only one row in you use A3 as start and end row.
You also have the row number and lookup value in the ame cell - odd.
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my
addy)
Clarification:
SheetM is remamed to Marks.
I didn't mention it in the previous posting
Hi,
I tried the following in cell G21 SheetC:
=IF(COUNT(E21:F21)=2,VLOOKUP($A$3,AVERAGE(INDIRECT("Marks!H"&A3&":J"&A3)),""))
and had the FALSE in the cell.
Note:
Cell A3 in sheetC containes a name of a person, I need the three
numbers related to that person from sheetM to have their average
Hope it is more clear now.
=IF(count(E21:F21)=2,
Vlookup($A$3,average(INDIRECT("sheetm!H"&A3&":J"&A3)),......),"")
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in
my addy)
Hi,
SheetC has a lookup value in cell A3
I need to use the VLOOKUP with condition at cell G21 in sheetC in
a way that:
If range E21:F21=2 put the value (in G21) else put ""
the value in G21 is the average of three successive cells in
sheetM range H14:J14 . It might change to H23:J23 depending on the
lookup value in A3.
The formula in cell G21 in sheetC might look like:
=IF(count(E21:F21)=2,
[Vlookup($A$3,average(sheetm!H14:J14),......],"")
the part between [ ] is what I am always having a problem in.
any help is appreciated