From Formula to Value

  • Thread starter Thread starter aw
  • Start date Start date
A

aw

Can anyone can help how to write the VB code by using of :

“For Each†& “Select Case†for the purpose of changing all its formula into
value in selected cells / area.

In addition, it will not get an error message in case of ‘value’ the cells
with 'text'.

Thx a lot!
 
You don't need For Each and Select Case to do that. Select your cells and
then simply execute this single statement...

Selection.Value = Selection.Value
 
It works if it is in regular area.

However it can't work if it is in mutiple cells / area not in regular by one
time.

For example, select cells N9..P10, R10..R11 & S20..T21 at a time.
 
Give this code a try then...

For Each A In Selection.Areas
A.Value = A.Value
Next
 

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

Back
Top