We help IT Professionals succeed at work.
Get Started

Get the Extreme Left and Right Cell addresses

Rayne asked
Last Modified: 2012-08-16
Hello Everyone,

I am looking for a code that does this. I am tired to manually mentioning the first and the last column header address in all of my functions so need this macro to grab these extreme left – right cell address. Now..
What it does >> it looks at sheet1  - the very first row that has the column names – searches left and right….when it searches left, it grabs c1’ cell address (B3)  - when it searches extreme right, it gets the c9’s cell address and finally give s a msgbox saying :
Left Header Cell : “B3”
Right Header Cell: “J3”

Please note that the first row that has the column names can be at row 3 or any other row…so it has to do some type of search or something
Watch Question
Cost Accountant
Top Expert 2012
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE