From Formula to Value
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! -- aw |
From Formula to Value
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 -- Rick (MVP - Excel) "aw" wrote in message ... 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! -- aw |
From Formula to 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. -- aw "Rick Rothstein" wrote: 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 -- Rick (MVP - Excel) "aw" wrote in message ... 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! -- aw |
From Formula to Value
Give this code a try then...
For Each A In Selection.Areas A.Value = A.Value Next -- Rick (MVP - Excel) "aw" wrote in message ... 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. -- aw "Rick Rothstein" wrote: 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 -- Rick (MVP - Excel) "aw" wrote in message ... 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! -- aw |
All times are GMT +1. The time now is 12:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com