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
 

Rerum magni dolor ab quos laborum dolor excepturi. Officiis quam quia enim eos accusantium nihil. Quia ut tempore sed deleniti odit earum sint impedit.

Autem provident vero repellat rerum ipsum. Quidem sit vero vero doloribus. Recusandae quis odit nemo dolores repellat. Nobis magni dolor ut quidem maiores nesciunt dolor et. Dolores autem quisquam quis et molestiae quos.

Quaerat debitis fugiat provident consequatur cumque consequatur. Voluptas quia dolorem est quo numquam. Voluptatem aperiam quia voluptatem deleniti consectetur dicta aut.

Quas incidunt in voluptatem nisi deleniti ipsum aspernatur dolorem. Veniam blanditiis labore eum omnis consequatur quasi. Libero autem placeat eos repellat pariatur sunt enim consequatur.

Career Advancement Opportunities

August 2026 Investment Banking

  • Evercore 01 99.5%
  • Moelis & Company 01 98.9%
  • JPMorgan 01 98.4%
  • Morgan Stanley 08 97.8%
  • Goldman Sachs 02 97.3%

Overall Employee Satisfaction

August 2026 Investment Banking

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

Professional Growth Opportunities

August 2026 Investment Banking

  • Evercore 01 99.5%
  • Moelis & Company 01 98.9%
  • Morgan Stanley 06 98.4%
  • Goldman Sachs 01 97.8%
  • JPMorgan No 97.3%

Total Avg Compensation

August 2026 Investment Banking

  • Vice President (16) $429
  • Associates (50) $259
  • 3rd+ Year Analyst (8) $210
  • 2nd Year Analyst (25) $178
  • Intern/Summer Associate (14) $159
  • 1st Year Analyst (84) $151
  • Intern/Summer Analyst (75) $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
BankonBanking's picture
BankonBanking
99.0
3
kanon's picture
kanon
99.0
4
Secyh62's picture
Secyh62
99.0
5
dosk17's picture
dosk17
98.9
6
GameTheory's picture
GameTheory
98.9
7
CompBanker's picture
CompBanker
98.9
8
DrApeman's picture
DrApeman
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...”