Batch update cell values

M

Moshe Rosenberg

I need to batch update all cell values in a sheet over the value of 200 to
become 200.

How can I accomplish this?
 
M

Max

Use a helper sheet ..

Assuming source data in Sheet1, within A1:D20 (say)

In Sheet2,

Put in A1:
=IF(Sheet1!A1="","",IF(Sheet1!A1>200,200,Sheet1!A1))
Copy A1 across to D1, fill down to D20
Then copy A1:D20, & paste and overwrite A1:D20 in Sheet1
 
M

Moshe Rosenberg

I am not sure what to do with Sheet2. When I put that into the A1 cell, then
what? What actually updates the data?

I would be grateful if you can clarify.

Thanks!
 
M

Max

As stated in my response, I assumed your source data was in Sheet1, within
A1:D20. Sheet2 is just a helper sheet, which is used to examine Sheet1's
source data and change the values as required, using a corresponding range
filled with the formulas as given. Hope that clarifies ..
 
M

Moshe Rosenberg

Thanks, that helped!

Max said:
As stated in my response, I assumed your source data was in Sheet1, within
A1:D20. Sheet2 is just a helper sheet, which is used to examine Sheet1's
source data and change the values as required, using a corresponding range
filled with the formulas as given. Hope that clarifies ..
 
G

Gord Dibben

Sub Make_200()
Dim cell As Range
For Each cell In Selection
If cell.Value > 200 Then
cell.Value = 200
End If
Next
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top