How to change VBA formula to value

zinah

Active Member
Joined
Nov 28, 2018
Messages
353
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have below VB formulas and I need to turn each formula to value, can anyone advise how?

Code:
Range("AA18:AA42").Formula = "=IFERROR(1-(AD18/AC18),IFERROR(1-(AD18/AC18)," & Chr(34) & Chr(34) & "))"Range("AB18:AB42").Formula = "=IFERROR(AD18/AC18,"""")"
Range("Z18:Z42").FormulaR1C1 = "=IF(RC[-1] = """", """", IF(ISNUMBER(RC[-1]), ""Org. Layer"" & CHAR(32) & RC[-1], RIGHT(RC[-1], LEN(RC[-1])-7)))"
Range("AB18:AB42").Formula = "=IFERROR(AD18/AC18,"""")"
Range("AC18:AC42").FormulaR1C1 = "=IFERROR(COUNTIFS(INDIRECT(IF(R16C25 = ""by Loc"", R14C31, R13C31)), RC25, INDIRECT(R15C31), R13C26, Manipulated_Data!R1C18:R8089C18, ""Regular Employee"", Manipulated_Data!R1C19:R8089C19, ""<>""&""Hourly""),"""")"
Range("AD18:AD42").FormulaR1C1 = "=COUNTIFS(INDIRECT(IF(R16C25 = ""by Loc"", R14C31, R13C31)), RC25, INDIRECT(R15C31), R13C26, Manipulated_Data!R1C18:R8089C18, ""Regular Employee"", Manipulated_Data!R1C19:R8089C19, ""<>""&""Hourly"",Manipulated_Data!R1C83:R8089C83,0)"
Range("AE18:AE42").FormulaR1C1 = "=COUNTIFS(INDIRECT(IF(R16C25 = ""by Loc"", R14C31, R13C31)), RC25, INDIRECT(R15C31), R13C26, Manipulated_Data!R1C18:R8089C18, ""Regular Employee"", Manipulated_Data!R1C19:R8089C19, ""<>""&""Hourly"",Manipulated_Data!R1C83:R8089C83,""<>""&0)"
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
do this for each formula

Code:
with Range("AA18:AA42")
.Formula = "=IFERROR(1-(AD18/AC18),IFERROR(1-(AD18/AC18)," & Chr(34) & Chr(34) & "))"Range("AB18:AB42").Formula = "=IFERROR(AD18/AC18,"""")"
.value=.value
end with
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,687
Members
449,117
Latest member
Aaagu

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