Vishaal
Well-known Member
- Joined
- Mar 16, 2019
- Messages
- 543
- Office Version
- 2010
- 2007
- Platform
- Windows
- Web
want to make some changes in below code, need only 3 changes, help pls
we have added the number in code where we need to change.................
1. Selection.AutoFill Destination:= it will select range E and last range of E will be till last filled data in D
2. range("E14:E1779").Select = it will be From E14 to last filled data in D
3. Selection.AutoFill Destination:=Range("HH14:HH1779") - it will select from HH14 and last range will be till last filled data in D
we have added the number in code where we need to change.................
1. Selection.AutoFill Destination:= it will select range E and last range of E will be till last filled data in D
2. range("E14:E1779").Select = it will be From E14 to last filled data in D
3. Selection.AutoFill Destination:=Range("HH14:HH1779") - it will select from HH14 and last range will be till last filled data in D
Rich (BB code):
Sub Macro2468()
'
Range("E14").Select
ActiveCell.FormulaR1C1 = "=IF(ISNUMBER(MATCH(RC4,R1C:R4C,0)),"""",""Na"")"
Range("E14").Select
1. Selection.AutoFill Destination:=Range("E14:E1779")
2. Range("E14:E1779").Select
Selection.Copy
Range("F14:HF14").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("HH14").Select
ActiveCell.FormulaR1C1 = _
"=IF(AND(RC[-211]=""Na"",R[1]C[-211]=""""),COUNTIF(R1C[-211]:RC[-211],""Na"")-SUM(R12C:R[-1]C),"""")"
Range("HH14").Select
3. Selection.AutoFill Destination:=Range("HH14:HH1779"), Type:=xlFillDefault
Application.ScreenUpdating = True
With ActiveSheet
lr = .Cells(Rows.Count, "HH").End(xlUp).Row
Set Rng = Range("HH14:HH" & lr)
Rng.Copy
For i = 217 To 425
.Cells(14, i).PasteSpecial Paste:=xlPasteFormulas
With .Cells(14, i).Resize(lr + 1)
End With
Next
End With
Application.ScreenUpdating = True
Cells.Select
Application.CutCopyMode = False
With Selection
.HorizontalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("E14").Select
End Sub
Last edited by a moderator: