MrManBoy
New Member
- Joined
- May 28, 2014
- Messages
- 37
- Office Version
- 365
- Platform
- Windows
- Mobile
- Web
Gday All,
Trying to achieve: I have a list of formulae that I need to enter into a particular "Sheet" via VBA. The range is H2:X5000.
I have searched far and wide across the internet only to find solutions that do not yeild any results, literally for some reason.
Examples of some of the formulas being used:
One example of code I did try for just column H was:
This did not work, nor did it cause any errors, yet if I remove the extra quotation marks from the formula, then I get a code error.
Well, hopefully the above made sense, as usual, if it didn't, let me what further info is needed
Appreciate any assistance given
Trying to achieve: I have a list of formulae that I need to enter into a particular "Sheet" via VBA. The range is H2:X5000.
I have searched far and wide across the internet only to find solutions that do not yeild any results, literally for some reason.
Examples of some of the formulas being used:
- =IF($A2="","No Data Extracted",IF(ISNA(VLOOKUP($A2,HRData,1,FALSE)),"N","Y"))
- =IF($A2="","No Data Extracted",IF($H2="N","Y","N"))
- =IF($K2="Manual Check Required",$K2,EXACT($C2,$K2))
- =IF($A2="","No Data Extracted",IF($H2="N","Manual Check Required",VLOOKUP($A2,HRData,6,FALSE)))
- =IF($H2="N","Manual Check Required",IF($J2=TRUE,"Not Required",VLOOKUP($A2,HRData,6,FALSE)))
One example of code I did try for just column H was:
Code:
Dim lngLastRow As Long
lngLastRow = Cells(Rows.Count, "H").End(xlUp).Row
Range("H2:H5000" & lngLastRow).Formula = "=IF($A2="",""No Data Extracted"",IF(ISNA(VLOOKUP($A2,HRData,1,FALSE)),""No"",""Yes""))"
This did not work, nor did it cause any errors, yet if I remove the extra quotation marks from the formula, then I get a code error.
Well, hopefully the above made sense, as usual, if it didn't, let me what further info is needed
Appreciate any assistance given