Someone asked for a way to do this on global, and i found this some time ago, so i'm posting it here:

Code:
/cleartarget [mod:alt]
/ins
/run local t,c,u=0,0,UnitExists("target") and "target" or "player" for i =1,18 do if i~=4 then local k=GetInventoryItemLink(u,i) if k then local _,_,_,l=GetItemInfo(k) t=t+l c=c+1 end end end if c>0 then print(t/c) end

This macro will print out in your chat frame, average equipped ilvl of any person of your faction, when you are in range to inspect them.


NOTE: This macro calculates average of equipped, so a person with ONE item equipped of ilvl 359, will still give result 359