Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXCEL - select first 4 characters, paste two col. over

Status
Not open for further replies.

dh42891

Technical User
Oct 7, 2003
107
US
I have a couple hundred records that I need the first 4 characters from a certain column. I can get VBA to copy the entire cell, but I'm not sure how to tell it to only copy and paste the first four characters. Can anyone help? Thanks,

dylan
 

You can only copy and paste entire cells.

But there are STRING function like LEFT.
[tt]
=LEFT(A1,4)
[/tt]
returns the first 4 characters from the string in A1.


Skip,

[glasses] [red]Be Advised![/red]
A wee deranged psychic may be runnin' around out there!
SMALL MEDUIM @ LARGE[tongue]
 
You can do this with worksheet functions (without using VBA).
If your data is in column A, then in another column, use this formula in the second row:
[COLOR=blue white]=left(a2,4)[/color]

[tt]_____
[blue]-John[/blue][/tt]

Help us help you. Please read FAQ181-2886 before posting.
 
well i'll be damned. Thanks!

dylan

ps heck of a response time, appreciate that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top