How to change VBA formula to value

zinah

Active Member
Joined
Nov 28, 2018
Messages
368
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

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
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,224,749
Messages
6,180,725
Members
452,995
Latest member
isldboy

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