Excel Model Help?

Hey guys - so I'm trying to find the average return on natural gas that my firm trades at certain domestic hubs and have a spreadsheet with thousands of rows of data and only some of it is actual volumes of natural gas given that for some reason the sheet shows dollar amounts on 0 volume which are erroneous entries that the trading log is spitting out or they're based on deals structured in specific ways that I don't need to include in my model.

So for my question: If for example - the volumes are contained in column A and the returns are contained in column B how do I calculate the returns on ONLY the gas contained in column B when column A is greater than 0?

Thanks!

3 Comments
 

Sumif and Countif In your case, Sumif(A1:An,">0",B1:Bn)/Countif(A1:An,">0") This sums up all of the returns with a volume greater than 0, then divides it by the number of days traded with volumes great than 0 to find the average.

make it hard to spot the general by working like a soldier
 

Sit quia voluptates cumque delectus. Maxime eligendi aut nulla optio debitis laboriosam.

Assumenda vitae vero similique nam sint. A dolores nihil molestiae. Suscipit nulla voluptatem aut veniam fuga sed. Corporis aut quaerat harum provident voluptas repellendus iste.

Sequi illo itaque blanditiis officiis voluptas qui. Velit eos est quibusdam et facilis molestiae qui quam. Expedita veniam sed numquam et asperiores.

Career Advancement Opportunities

July 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.9%
  • JPMorgan 01 98.3%
  • Guggenheim Partners 01 97.7%
  • Morgan Stanley 07 97.1%

Overall Employee Satisfaction

July 2026 Investment Banking

  • Moelis & Company No 99.4%
  • Evercore No 98.9%
  • Morgan Stanley 01 98.3%
  • BMO Capital Markets 12 97.7%
  • Banco Santander 01 97.1%

Professional Growth Opportunities

July 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.9%
  • Morgan Stanley 06 98.3%
  • Goldman Sachs 01 97.7%
  • JPMorgan 01 97.1%

Total Avg Compensation

July 2026 Investment Banking

  • Vice President (15) $434
  • Associates (46) $258
  • 3rd+ Year Analyst (8) $210
  • 2nd Year Analyst (22) $179
  • Intern/Summer Associate (13) $156
  • 1st Year Analyst (80) $150
  • Intern/Summer Analyst (73) $101
notes
16 IB Interviews Notes

“... there’s no excuse to not take advantage of the resources out there available to you. Best value for your $ are the...”

Leaderboard

1
redever's picture
redever
99.2
2
Secyh62's picture
Secyh62
99.0
3
kanon's picture
kanon
99.0
4
BankonBanking's picture
BankonBanking
99.0
5
GameTheory's picture
GameTheory
98.9
6
DrApeman's picture
DrApeman
98.9
7
CompBanker's picture
CompBanker
98.9
8
dosk17's picture
dosk17
98.9
9
Betsy Massar's picture
Betsy Massar
98.9
10
numi's picture
numi
98.8
success
From 10 rejections to 1 dream investment banking internship

“... I believe it was the single biggest reason why I ended up with an offer...”