Need macro solution to copy/paste formula from first filtered cell

mwhulse

New Member
Joined
Jul 13, 2012
Messages
4
I need a macro solution to perform the following tasks...

1. Filter column A for all blanks
2. Select first resulting cell and enter a formula in it
3. Copy that formula into columns B thru O then down to last row in filtered list
4. Copy all new formula cells and paste value over them
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Ok... I was able to complete step 1 and the first part of step 2 with the following

Sub Commit()
'
' Filter column A for blanks and select column A row 2
'
Columns("A:A").Select
ActiveSheet.Range("$A$1:$T$3000").AutoFilter Field:=4, Criteria1:="="
'
' Select first cell in filtered results
'
Range([A2], Cells(Rows.Count, "A")).SpecialCells(xlCellTypeVisible)(1).Select
End Sub


Now my challenge is how to enter the following formula in the selected cell using VB Macro to complete step 2 ...

=OFFSET(CurrentCell.Address,-1,0)
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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