highlight cells then change their values

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi

I want to select/highlight random cells in a table then multiply them by 20% and then update these cells value. for example

A1 = A1 * 20%

Then after the update, I want to be able to highlight or select or point to the cells that I just changed their values. Similar idea to the Formula Auditing Precedents tool. Or just highlight them. is that possible?

Thank you so much.

975871558713
976968168026
889158341545
428630193752
356967383338
654278286225
176375512549
567110566980

<colgroup><col width="64" span="6" style="width:48pt"> </colgroup><tbody>
</tbody>
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
How about

Rich (BB code):
Sub lezawang()
   Dim Rng As Range, Cl As Range
   For Each Rng In Selection.Areas
      For Each Cl In Rng
         Cl.Value = Cl.Value * 0.2
      Next Cl
      Rng.Interior.Color = 56789
   Next Rng
End Sub
 
Upvote 0
Thank you very much. That is what I was looking for. Thanks again
 
Upvote 0
My pleasure & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,387
Messages
6,119,225
Members
448,877
Latest member
gb24

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