Editing multiple cells at once

DMT

New Member
Joined
Jan 21, 2004
Messages
28
Here's the problem. Say I have a column of 5 numbers. They are 1000, 2000, 3000, 4000, and 5000. I want to convert these to thousands, but I don't want to make another column with a formula. I want to change those existing cells. So, basically, I would like to include /1000 to each of those cells, without going into each cell and entering the formula. Since all the cells will be edited in the same way, I'm guessing there is an easy way to apply the same change to all selected cells. Can I do this? Thanks for the help.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Simply highlight the range you want to fix and run this simple macro:

Code:
Sub FixNumbers()

    Application.ScreenUpdating = False
    
    Dim cell As Range
    For Each cell In Selection
        cell = cell / 1000
    Next cell
    
    Application.ScreenUpdating = True
    
End Sub
 
Upvote 0
You could also put 1000 in a blank cell, copy this cell, then PasteSpecial and under the Operation section choose divide. If the cells contains values, then they will be divided by 1000 and if they contain formulas, the formulas will be adjusted to show division by 1000.
 
Upvote 0
Thanks,

Is there a way to do this without a macro? I seem to remember someone showing me a way to do it just using a certain key combination.
 
Upvote 0
See Seti's reply above for a macro-less solution.
 
Upvote 0
I have a similar questions, but I do not want to replace any of the data.

I have data that is exported to excel that look like dates but are text instead:
Fig.1
<TABLE style="WIDTH: 98pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=130 border=0><COLGROUP><COL style="WIDTH: 98pt; mso-width-source: userset; mso-width-alt: 4754" width=130><TBODY><TR style="HEIGHT: 15pt" height=20><TD class=xl70 style="BORDER-RIGHT: #d0d7e5 0.5pt solid; BORDER-TOP: #d0d7e5 0.5pt solid; BORDER-LEFT: #d0d7e5 0.5pt solid; WIDTH: 98pt; BORDER-BOTTOM: #d0d7e5 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" width=130 height=20>11-JUL-2011</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl70 style="BORDER-RIGHT: #d0d7e5 0.5pt solid; BORDER-TOP: #d0d7e5; BORDER-LEFT: #d0d7e5 0.5pt solid; BORDER-BOTTOM: #d0d7e5 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>02-MAY-2010</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl70 style="BORDER-RIGHT: #d0d7e5 0.5pt solid; BORDER-TOP: #d0d7e5; BORDER-LEFT: #d0d7e5 0.5pt solid; BORDER-BOTTOM: #d0d7e5 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>24-APR-2011</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl70 style="BORDER-RIGHT: #d0d7e5 0.5pt solid; BORDER-TOP: #d0d7e5; BORDER-LEFT: #d0d7e5 0.5pt solid; BORDER-BOTTOM: #d0d7e5 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>04-MAY-2011</TD></TR></TBODY></TABLE>
After formatting the cells to date and specify the format to: dd-mmm-yy, it still looks like the above. When I click on the cell, hit F2 and enter, it turns the cells to the date format:
Fig. 2
<TABLE style="WIDTH: 98pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=130 border=0><COLGROUP><COL style="WIDTH: 98pt; mso-width-source: userset; mso-width-alt: 4754" width=130><TBODY><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: #d0d7e5 0.5pt solid; BORDER-TOP: #d0d7e5 0.5pt solid; BORDER-LEFT: #d0d7e5 0.5pt solid; WIDTH: 98pt; BORDER-BOTTOM: #d0d7e5 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" align=right width=130 height=20>11-Jul-11</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: #d0d7e5 0.5pt solid; BORDER-TOP: #d0d7e5; BORDER-LEFT: #d0d7e5 0.5pt solid; BORDER-BOTTOM: #d0d7e5 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" align=right height=20>2-May-10</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: #d0d7e5 0.5pt solid; BORDER-TOP: #d0d7e5; BORDER-LEFT: #d0d7e5 0.5pt solid; BORDER-BOTTOM: #d0d7e5 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" align=right height=20>24-Apr-11</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: #d0d7e5 0.5pt solid; BORDER-TOP: #d0d7e5; BORDER-LEFT: #d0d7e5 0.5pt solid; BORDER-BOTTOM: #d0d7e5 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" align=right height=20>4-May-11</TD></TR></TBODY></TABLE>

Fig. 2 is what I want. I have over 1000 cells that needs to be converted, using the F2-Enter function. Is there way to edit and enter all cells at once, or create a macro to do it, without replacing the data within the cell?

The reason for needing to edit all the cells with Fig.1 to Fig.2, is because I have date formulas and it wouldn't recognize the text as dates, until it is converted manually by F2-Enter.
 
Upvote 0
Select the column, Data > Text to columns, Finish.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,718
Members
448,986
Latest member
andreguerra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top