Combining Average and Vlookup formula

djw1998

New Member
Joined
May 25, 2022
Messages
21
Office Version
  1. 365
Platform
  1. Windows
I'm looking to average specific line items across a couple different sheets, but only want to include numbers that are greater than 0.

For Example - I want to average rent revenue across a few different tabs but dont want the tabs with $0 to bring down the average.

My current formula is: =AVERAGE(VLOOKUP(B7,Sheet1!B6:Q102,16,FALSE),VLOOKUP(!B7,'Sheet2'!B6:Y95,24,FALSE),VLOOKUP(B7,Sheet3!B7:Z97,25,FALSE))


1675091510064.png
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
How about
Excel Formula:
=LET(a,VLOOKUP(B7,Sheet1!B6:Q102,16,FALSE),b,VLOOKUP(B7,Sheet2!B6:Y95,24,FALSE),c,VLOOKUP(B7,Sheet3!B7:Z97,25,FALSE),AVERAGE(IF(a=0,"",a),IF(b=0,"",b),IF(c=0,"",c)))
 
Upvote 0
How about
Excel Formula:
=LET(a,VLOOKUP(B7,Sheet1!B6:Q102,16,FALSE),b,VLOOKUP(B7,Sheet2!B6:Y95,24,FALSE),c,VLOOKUP(B7,Sheet3!B7:Z97,25,FALSE),AVERAGE(IF(a=0,"",a),IF(b=0,"",b),IF(c=0,"",c)))
1675092951057.png



My only issue is that it seems I get an error message when one of the sheets has a certain line item that the others do not.

For Example: "Model Apartment" returns a #VALUE! error.
 
Upvote 0
Do you have #value errors on any of the other sheets?
 
Upvote 0
But the formula is looking at the other sheets.
 
Upvote 0
But the formula is looking at the other sheets.
This formula is being used on one master sheet to pull averages from 3 other sheets. If one of the other sheets does not have a line item that is listed on the master sheet, it will return an error message.
 
Upvote 0
How about
Excel Formula:
=LET(a,XLOOKUP(B7,Sheet1!B6:B102,Sheet1!Q6:Q102,""),b,XLOOKUP(B7,Sheet2!B6:B95,Sheet2!Y6:Y95,""),c,XLOOKUP(B7,Sheet3!B7:B97,Sheet3!Z7:Z97,""),v,VSTACK(a,b,c),AVERAGE(FILTER(v,v<>"")))
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,643
Members
449,093
Latest member
Ahmad123098

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top