Remove last octet using excel formula

All,

I have a list of IP's in column A1 and I want to remove the last octet and display up to the 3rd octet in column B1.

10.50.42.201
10.50.143.150
10.50.148.120
10.50.65.100

(example...10.50.42 instead of 10.50.42.201)
LVL 19
Edward PamiasTeam Lead RRS DeskAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AlanConsultantCommented:
Hi,

If the full IP address is in A1, use this in B1 and copy down as far as required:

=LEFT(A1,FIND(CHAR(1),SUBSTITUTE(A1,".",CHAR(1),3))-1)

HTH,

Alan.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Edward PamiasTeam Lead RRS DeskAuthor Commented:
This is perfect! Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.