View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
crazy_vba crazy_vba is offline
external usenet poster
 
Posts: 1
Default how to get specific strings out of a cell ?


Hello everyone !
My first steps in this *nice* forum :-)

here is my question :

I got in C37 cell this: Year began: 1965 Franchising since: 1974

Basically i'm importing this from the web and I will always have in
this cell this text, with this format, though dates will change.

I would like to write a macro that will enter this cell, copy/paste the
first date, here 1965 in cell C14 and then copy/paste the second date in
cell C15.

When I use the recorder, It just copies twice in C14 and C15 the last
date, 1974.
How can I do that ?

Here is my script:
Range("C37").Select
ActiveCell.FormulaR1C1 = "Year began: 1965 Franchising since:
1974"
Range("C14").Select
ActiveSheet.Paste
Range("C37").Select
ActiveCell.FormulaR1C1 = "Year began: 1965 Franchising since:
1974"
Range("C15").Select
ActiveSheet.Paste


--
crazy_vba
------------------------------------------------------------------------
crazy_vba's Profile: http://www.excelforum.com/member.php...o&userid=33679
View this thread: http://www.excelforum.com/showthread...hreadid=534508