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
 

Beatae id et quaerat et soluta ut cumque nemo. Eveniet consequuntur cumque officiis consequatur qui hic ad. Ad mollitia sunt autem rerum. Sit omnis eos ea rem voluptatem necessitatibus. Nihil illo et rem eum nostrum.

Unde voluptatibus corporis adipisci cum aut. Ad cumque quasi repellendus eaque cum veniam accusamus. Asperiores dolorum inventore dignissimos beatae quia et. Vel voluptas ut qui eligendi ullam.

Aut quod dolor earum asperiores earum et. Omnis sunt quo commodi voluptatem. Dignissimos hic occaecati aut praesentium tenetur. Deleniti et totam asperiores autem et officia. Aspernatur eius magni ea consequuntur est. Atque est saepe sint est at. Aut aliquid numquam soluta unde.

Career Advancement Opportunities

October 2026 Investment Banking

  • Evercore 01 99.5%
  • Moelis & Company 01 98.9%
  • JPMorgan 01 98.4%
  • Morgan Stanley 07 97.9%
  • Guggenheim Partners 01 97.4%

Overall Employee Satisfaction

October 2026 Investment Banking

  • Moelis & Company No 99.5%
  • Morgan Stanley 02 98.9%
  • Evercore 01 98.4%
  • Banco Santander 02 97.9%
  • BMO Capital Markets 12 97.4%

Professional Growth Opportunities

October 2026 Investment Banking

  • Evercore 01 99.5%
  • Moelis & Company 01 98.9%
  • Morgan Stanley 05 98.4%
  • Goldman Sachs 01 97.9%
  • JPMorgan No 97.4%

Total Avg Compensation

October 2026 Investment Banking

  • Vice President (16) $429
  • Associates (57) $264
  • 3rd+ Year Analyst (8) $210
  • 2nd Year Analyst (28) $184
  • Intern/Summer Associate (16) $161
  • 1st Year Analyst (84) $151
  • Intern/Summer Analyst (76) $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
BankonBanking's picture
BankonBanking
99.0
4
kanon's picture
kanon
99.0
5
DrApeman's picture
DrApeman
98.9
6
Betsy Massar's picture
Betsy Massar
98.9
7
dosk17's picture
dosk17
98.9
8
CompBanker's picture
CompBanker
98.9
9
GameTheory's picture
GameTheory
98.9
10
Linda Abraham's picture
Linda Abraham
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...”