ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to edit cells (https://www.excelbanter.com/excel-programming/369913-macro-edit-cells.html)

esskaykay[_3_]

Macro to edit cells
 

I’m trying to add a number and a hyphen (i.e., 123-) to the values i
all cells in a column. Under the old Lotus 123 DOS days, my macro cod
would read something like:

{edit}{home}123-{down}~

However, now with Excel, and VBA, I’m having a real problem do this.
Any ideas?

Thanks,
SK

--
esskayka
-----------------------------------------------------------------------
esskaykay's Profile: http://www.excelforum.com/member.php...nfo&userid=871
View this thread: http://www.excelforum.com/showthread.php?threadid=57011


MSweetG222

Macro to edit cells
 
SKK -

Consider using a formula instead....

ColA ColB
---------- -------------
1 ABC =A1&"-123" <<< if it goes on back end
2 XYZ ="123-"&A2 <<< if it goes on front end
3
4

Then just copy / paste values (Edit | Copy, Edit | Paste Special | Values).
I think that will be much faster for you. Hope that is what you need.
--
Thx
MSweetG222



"esskaykay" wrote:


Im trying to add a number and a hyphen (i.e., 123-) to the values in
all cells in a column. Under the old Lotus 123 DOS days, my macro code
would read something like:

{edit}{home}123-{down}~

However, now with Excel, and VBA, Im having a real problem do this.
Any ideas?

Thanks,
SKK


--
esskaykay
------------------------------------------------------------------------
esskaykay's Profile: http://www.excelforum.com/member.php...fo&userid=8715
View this thread: http://www.excelforum.com/showthread...hreadid=570117




All times are GMT +1. The time now is 05:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com