I am trying to copy the top cell of a filtered results table to help with a check on another tab.
I tried recording a macro where i went to the top of the column then down 1 cell but it remembered the cell number(556) rather then down 1.
Thanks
I am trying to copy the top cell of a filtered results table to help with a check on another tab.
I tried recording a macro where i went to the top of the column then down 1 cell but it remembered the cell number(556) rather then down 1.
Thanks
One way:
![]()
Sub CopyFirst() Dim LR As Long, MyRNG As Range On Error Resume Next LR = Range("B" & Rows.Count).End(xlUp).Row Set MyRNG = Range("B2:B82").SpecialCells(xlCellTypeVisible) MyRNG(1).Copy Sheets("Dest").Range("A1") End Sub
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
Sorry can you give me a bit more help on that please? I am using Excel 2003. It colomn *J* i am looking to get the top value from.
What help would you like? I'm sure you can edit the column "B" references to column "J". What else would you like?
This is the target example in the code:
Edit that to your preferred destination.![]()
Sheets("Dest").Range("A1")
Thank you!
Is there anyway to paste that result into the 'page' section of a pivot table?
You should be able to just assign the cell's value to the Currentpage property of the relevant page field in the pivot table.
Everyone who confuses correlation and causation ends up dead.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks