VBA question

working on a project using VBA

I need to create a function, but i need my variables to refer to individual cells on separate spreadsheets.

say for instance i want something like

answer= cell c6* cell f3

How do i name those variables??

thanks

5 Comments
 

PFWizard is right. I tend to do:

x = worksheet("Sheet1").Range("B1").Value although I'm not sure why.

This to all my hatin' folks seeing me getting guac right now..
 
Ace all your PE interview questions with the WSO Private Equity Prep Pack: http://www.wallstreetoasis.com/guide/private-equity-interview-prep-questions
 

Qui ea mollitia quos et sunt aspernatur nobis. Ut nam vero doloremque nostrum temporibus omnis.

Iste enim vitae cum at vero enim. Ullam consequatur quam ut adipisci et velit. Et at sit nisi. Vero quis amet iste asperiores. Ut error soluta est est consequatur.

Sint molestiae id quia nesciunt eum beatae est eos. Et aut aut eligendi et inventore id. Cupiditate sapiente et dicta nulla.

Explicabo voluptatum natus quo et ex excepturi. Atque dolorem nihil qui. Omnis laborum natus ut cupiditate qui dolore est. Temporibus aut temporibus consequuntur. Corrupti aliquid est voluptatum eos quis praesentium illum. In repellat placeat doloremque enim.

Career Advancement Opportunities

September 2026 Investment Banking

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

Overall Employee Satisfaction

September 2026 Investment Banking

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

Professional Growth Opportunities

September 2026 Investment Banking

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

Total Avg Compensation

September 2026 Investment Banking

  • Vice President (16) $429
  • Associates (51) $260
  • 3rd+ Year Analyst (8) $210
  • 2nd Year Analyst (26) $182
  • Intern/Summer Associate (14) $159
  • 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
kanon's picture
kanon
99.0
4
BankonBanking's picture
BankonBanking
99.0
5
Betsy Massar's picture
Betsy Massar
98.9
6
DrApeman's picture
DrApeman
98.9
7
CompBanker's picture
CompBanker
98.9
8
dosk17's picture
dosk17
98.9
9
GameTheory's picture
GameTheory
98.9
10
Jamoldo's picture
Jamoldo
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...”