Excel Question - Generate all combination?

1) How do I get excel to generate all combinations 1x10 vector with only 0s and 1s. Ex: 1010100111, 0001000110, etc...

2) my spreadsheet takes the arrays above as an input and then computes a number. Using all of the combinations generated above, how do I get excel to calculate the result for each array generated?

Ex: Spreadsheet(1010100111) -------> 53 Spreadsheet(0001000110) -------> 127 etc. . .

9 Comments
 

For question #1, xelink has some great advice above. For question #2, I'm a bit confused by how you're calculating your numbers from your array. For instance, 1010100111 in binary is not 57, nor is 0001000110 equal to 127. Are you intending to assign random numbers to the arrays? Or perhaps some schema you've already developed but aren't divulging?

Another way to do this is with VBA where you could build out a function to perform the calculation. This is pretty easy and wouldn't take long to learn if you're unfamiliar with VBA.

"My caddie's chauffeur informs me that a bank is a place where people put money that isn't properly invested."
 

Google on how to create your own workbook functions, it's very simple to do in VBA and there are lots of good tutorials out there.

This to all my hatin' folks seeing me getting guac right now..
 

Put 1-1024 in column A. Put this formula right next to it and copy down

=IF(A1512,DEC2BIN(A1,10),IF(A1>1024,1&DEC2BIN(A1-1,9),"1111111111"))

From what I can see that works. Now, like I said earlier, to be able to do spreadsheet(A57)= some number you are going to have to create a worksheet function in excel. Google it, lots of good tutorials.

xelink, the dec2bin has a length feature which really saved me a lot of work, just a heads up.

This to all my hatin' folks seeing me getting guac right now..
 
CruncharooPut 1-1024 in column A. Put this formula right next to it and copy down

=IF(A1512,DEC2BIN(A1,10),IF(A1>1024,1&DEC2BIN(A1-512,9),"1111111111"))

From what I can see that works. Now, like I said earlier, to be able to do spreadsheet(A57)= some number you are going to have to create a worksheet function in excel. Google it, lots of good tutorials.

xelink, the dec2bin has a length feature which really saved me a lot of work, just a heads up.

This to all my hatin' folks seeing me getting guac right now..
 

wtf repost. anyways

sorry about that. here is the correct formula

=IF(A1512,DEC2BIN(A1,10),IF(A1>1024,1&DEC2BIN(A1-512,9),"1111111111"))

This to all my hatin' folks seeing me getting guac right now..
 

Thank you guys for all the help! I wasn't able to finish the project as I found out excel isn't even powerful enough to calculate what I wanted. Still, I was able to learn a lot from the advice you guys gave.

basically my problem was to calculate the std dev of a N-sized portfolio from a pool of 30 stocks. There are just too many permutations for excel to handle. I'm thinking maybe matlab or mathematica might be better? some professional computational tool?

 

Vero commodi dignissimos et voluptatem. Sint animi sed est ut harum dolores. Et aut aut nisi ut.

Et nesciunt saepe perspiciatis et molestiae rerum. Mollitia pariatur blanditiis quam ea non odit dolores. Ab quasi et porro voluptas iure sequi. Omnis distinctio aut est.

Id libero laudantium voluptas nemo voluptate. Qui est suscipit reprehenderit sint sunt aut consequatur. Dolore minus quos ducimus est qui. Et ut error ut amet vel quisquam animi iste.

Doloremque officiis corporis ut. Qui ea ut unde quod vel. Possimus nihil voluptas qui nemo corporis qui. Totam at est libero in blanditiis. Eaque placeat dignissimos blanditiis distinctio qui. Facere cupiditate debitis et unde. Quis temporibus rerum et rerum.

Career Advancement Opportunities

August 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.9%
  • JPMorgan 01 98.3%
  • Morgan Stanley 08 97.8%
  • Goldman Sachs 02 97.2%

Overall Employee Satisfaction

August 2026 Investment Banking

  • Moelis & Company No 99.4%
  • Evercore No 98.9%
  • Morgan Stanley 01 98.3%
  • Banco Santander 02 97.8%
  • BMO Capital Markets 12 97.2%

Professional Growth Opportunities

August 2026 Investment Banking

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

Total Avg Compensation

August 2026 Investment Banking

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