Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

modify cell (delete) contents using macro

  Asked By: Gene    Date: Mar 19    Category: MS Office    Views: 1020
  

I have a column which contains elements like T27-1,T27-2...I would like to
modify those cell contents to T27 i.e delete the hypen and the subsequent
characters.Any idea how to accomplish this using a MACRO.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Mona Wagner     Answered On: Mar 19

Is there a requirement to use a macro? This could be done in a separate
column using ordinary functions and then overwrite the original column  if
needed.

If you realy want to use a macro  the the code would be something like...

... Select/set the range
... Loop through the range
... ... cell  text = mid(cell text,1,3)

 
Answer #2    Answered By: Eloise Lawrence     Answered On: Mar 19

Is there a requirement to use a macro? This could be done in a separate
column using ordinary functions and then overwrite the original column  if
needed.

If you realy want to use a macro  the the code would be something like...

... Select/set the range
... Loop through the range
... ... cell  text = mid(cell text,1,3)

 
Didn't find what you were looking for? Find more on modify cell (delete) contents using macro Or get search suggestion and latest updates.




Tagged: