cgeorge4
Board Regular
- Joined
- Jul 24, 2011
- Messages
- 91
Hello,
I use a code to hard code vlookup - but is it possible to hard code cells with SUMIF formula's only?
1) I want to hard code any variety of SUMIF or IF formula on the active worksheet.
2) I want the code to only work on the sheet that is activated.
3) There are other basic formulas (sum, subtraction, multiplication, division...etc) that should be left intact.
I've searched many places for a solution. The closest one had the name of the worksheet included in the code - and that will not work for my project. The worksheet name or tab name should not be a factor.
The code below is the code that I mentioned above, but not using. It refers to a workbook name. I pasted it here in case it might be helpful to you.
thank you in advance Darlings,
Juicy
I use a code to hard code vlookup - but is it possible to hard code cells with SUMIF formula's only?
1) I want to hard code any variety of SUMIF or IF formula on the active worksheet.
2) I want the code to only work on the sheet that is activated.
3) There are other basic formulas (sum, subtraction, multiplication, division...etc) that should be left intact.
I've searched many places for a solution. The closest one had the name of the worksheet included in the code - and that will not work for my project. The worksheet name or tab name should not be a factor.
The code below is the code that I mentioned above, but not using. It refers to a workbook name. I pasted it here in case it might be helpful to you.
Code:
[COLOR=#333333]Sub ReplaceSumIf()[/COLOR]
For Each sht In ActiveWorkbook.Sheets For Each cll In sht.UsedRange If cll.Formula Like "*SUMIF*Workbook2*" Then cll.Formula = cll.Value NextNext [COLOR=#333333]End Sub[/COLOR]
thank you in advance Darlings,
Juicy