l8t4meneomatrix
New Member
- Joined
- May 13, 2014
- Messages
- 2
Hello everyone,
I'm currently using the following code for a macro that replaces the one and only active cell's space for an underscore:
Sub Hello()
'Finds and replaces spaces with an nothing
ActiveCell.Value = Replace(ActiveCell.Value, " ", "_")
ActiveCell.Offset(0, 1).Select
End Sub
_________________________________
What I'm trying to figure out next is how to replace the selected cell's value and not just the "active" one.
For example this is what happens when I select more than one cell and use the VBAmacro:
Before-
Active Cell: 21R VW 12345 54321
Additional Selected Cell: 32R AZ 12345 54321
After-
Active Cell: 21RVW1234554321
Additional Selected Cell: 32R AZ 12345 54321
__________________________________
I'm trying to avoid using the "Range" of cells of course. Thank you in advance!
I'm currently using the following code for a macro that replaces the one and only active cell's space for an underscore:
Sub Hello()
'Finds and replaces spaces with an nothing
ActiveCell.Value = Replace(ActiveCell.Value, " ", "_")
ActiveCell.Offset(0, 1).Select
End Sub
_________________________________
What I'm trying to figure out next is how to replace the selected cell's value and not just the "active" one.
For example this is what happens when I select more than one cell and use the VBAmacro:
Before-
Active Cell: 21R VW 12345 54321
Additional Selected Cell: 32R AZ 12345 54321
After-
Active Cell: 21RVW1234554321
Additional Selected Cell: 32R AZ 12345 54321
__________________________________
I'm trying to avoid using the "Range" of cells of course. Thank you in advance!