lakshmipathi123
Board Regular
- Joined
- Jul 10, 2012
- Messages
- 52
- Office Version
- 365
- Platform
- Windows
Hi Experts,
I have query regarding visible cells macro. I need copy the formula from A20 to used range from B and paste visible cells from Row A20. Could you please help me regarding this. I have attached below codings.
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Liability[/TD]
[TD]Supplier Name
[/TD]
[/TR]
[TR]
[TD]=TRIM(B2)[/TD]
[TD]Liability Account :20110-2900-009669-0007-00000000[/TD]
[/TR]
[TR]
[TD]=TRIM(B3)[/TD]
[TD]Liability Account :20280-0000-008053-0007-00000000[/TD]
[/TR]
</tbody>[/TABLE]
'Getting value from range B to A using Trim
Range("B20").Select
Selection.Copy
Range("A20").Select
ActiveCell.FormulaR1C1 = "=TRIM(RC[1])"
Could you please provide codings copy the formula from A20 to used range from B and Paste visible cells from A20 to till Range "B" data availability?
Range("B20").Select
Selection.End(xlDown).Select
Range("A15844").Select ' last row should find based B data availability (it should not stop A15844 data may increase or decrease)
Range(Selection, Selection.End(xlUp)).Select
Range("A20:A15844").Select
Range("A15844").Activate
Selection.SpecialCells(xlCellTypeVisible).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.AutoFilter
Columns("A:A").Select
Range("A15512").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Thanks in advance
Lakshmipathi
I have query regarding visible cells macro. I need copy the formula from A20 to used range from B and paste visible cells from Row A20. Could you please help me regarding this. I have attached below codings.
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Liability[/TD]
[TD]Supplier Name
[/TD]
[/TR]
[TR]
[TD]=TRIM(B2)[/TD]
[TD]Liability Account :20110-2900-009669-0007-00000000[/TD]
[/TR]
[TR]
[TD]=TRIM(B3)[/TD]
[TD]Liability Account :20280-0000-008053-0007-00000000[/TD]
[/TR]
</tbody>[/TABLE]
'Getting value from range B to A using Trim
Range("B20").Select
Selection.Copy
Range("A20").Select
ActiveCell.FormulaR1C1 = "=TRIM(RC[1])"
Could you please provide codings copy the formula from A20 to used range from B and Paste visible cells from A20 to till Range "B" data availability?
Range("B20").Select
Selection.End(xlDown).Select
Range("A15844").Select ' last row should find based B data availability (it should not stop A15844 data may increase or decrease)
Range(Selection, Selection.End(xlUp)).Select
Range("A20:A15844").Select
Range("A15844").Activate
Selection.SpecialCells(xlCellTypeVisible).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.AutoFilter
Columns("A:A").Select
Range("A15512").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Thanks in advance
Lakshmipathi