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.

[TABLE="class: grid, width: 384"]
<colgroup><col width="64" span="6" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]97[/TD]
[TD="width: 64, align: right"]58[/TD]
[TD="width: 64, align: right"]71[/TD]
[TD="width: 64, align: right"]55[/TD]
[TD="width: 64, align: right"]87[/TD]
[TD="width: 64, align: right"]13[/TD]
[/TR]
[TR]
[TD="align: right"]97[/TD]
[TD="align: right"]69[/TD]
[TD="align: right"]68[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]80[/TD]
[TD="align: right"]26[/TD]
[/TR]
[TR]
[TD="align: right"]88[/TD]
[TD="align: right"]91[/TD]
[TD="align: right"]58[/TD]
[TD="align: right"]34[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="align: right"]42[/TD]
[TD="align: right"]86[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]37[/TD]
[TD="align: right"]52[/TD]
[/TR]
[TR]
[TD="align: right"]35[/TD]
[TD="align: right"]69[/TD]
[TD="align: right"]67[/TD]
[TD="align: right"]38[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]38[/TD]
[/TR]
[TR]
[TD="align: right"]65[/TD]
[TD="align: right"]42[/TD]
[TD="align: right"]78[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]62[/TD]
[TD="align: right"]25[/TD]
[/TR]
[TR]
[TD="align: right"]17[/TD]
[TD="align: right"]63[/TD]
[TD="align: right"]75[/TD]
[TD="align: right"]51[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]49[/TD]
[/TR]
[TR]
[TD="align: right"]56[/TD]
[TD="align: right"]71[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]69[/TD]
[TD="align: right"]80[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
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,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

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