Excel Help - Please

Hey,

I have an excel sheet of roughly 1000 numbers. This sheet will come to me monthly, most the time with the same numbers, but different information. Each number corresponds to something. I am wondering how to create an excel sheet or template so that when I open this excel sheet, the 1000 numbers will automatically switch to a name.

For example,

2331098 corresponds to Johnson Surface Air. I would like to set a macro so that whenever the excel sheet sees 2331098, it will automatically switch the name to Johnson Surface Air.

Any ideas?

Thanks.

9 Comments
 

I don't know much about macros (in fact I've been looking for good materials to learn more about them in the last days), but what you are looking for can be easily done with the vlookup function. And given that you need to do it just monthly anyway, it shouldn't be a huge drag to repeat the process everytime.

If you don't know the function, here's a short tutorial: http://www.contextures.com/xlfunctions02.html

edit: damn ninjas

 

Just kidding...if you do a Google search there are some pretty good sites I have found including forums that could explain v-lookup etc. better than I can. Might be worth it to download a copy of an Excel manual for reference, too.

Chance favors only the prepared mind.
 
Best Response

You can use the following macro.

Sub replace_company_names()

find_numbers = Array("234", "567", "3") Replace_companies = Array("First Company", "Second Company", "Third Company") Columns("a:a").Select Range("a:a").Activate array_size = UBound(find_numbers) For i = 0 To array_size Selection.Replace What:=find_numbers(i), Replacement:=Replace_companies(i), LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Next i

End Sub

Or you can use index(match)

Index + match is better than hlookup and vlookup imo because it's not column or row dependent. You can move in any dimension.

 

Similique ut maxime amet. Quod accusamus quas ipsa animi iure cumque autem. Exercitationem veniam vitae soluta et molestiae similique. Vel possimus fugit id eius numquam.

Accusantium qui sint odit est. Vero eos accusamus eligendi modi. Rerum molestiae nulla modi eos delectus debitis rerum. Aut consequatur qui reiciendis odit illo. Ut sit numquam mollitia tempore debitis quo.

Sint voluptatem maxime dolores ut ipsam. Id voluptas ducimus neque accusamus ipsum non in. Reprehenderit rerum id quos rerum animi provident ut. Porro minima laudantium est officiis quia possimus sed. Quis laudantium error maxime alias rerum eum quia.

Quisquam praesentium minima veniam neque aliquam omnis. Sunt necessitatibus corrupti itaque culpa nihil natus. Deserunt et minima est nostrum vel dolor.

Career Advancement Opportunities

October 2026 Investment Banking

  • Evercore 01 99.5%
  • Moelis & Company 01 99.0%
  • JPMorgan 01 98.4%
  • Guggenheim Partners 02 97.9%
  • Morgan Stanley 06 97.4%

Overall Employee Satisfaction

October 2026 Investment Banking

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

Professional Growth Opportunities

October 2026 Investment Banking

  • Evercore 01 99.5%
  • Moelis & Company 01 99.0%
  • 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
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
Betsy Massar's picture
Betsy Massar
98.9
9
DrApeman's picture
DrApeman
98.9
10
bolo up's picture
bolo up
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...”