PC Review


Reply
Thread Tools Rate Thread

Copying filtered four cells by means of macro

 
 
CousinExcel
Guest
Posts: n/a
 
      15th Jan 2010
Thanks to Jacob Skaria.
But still I need to mark and copy four cells by shift+down+down+down+down I
believe.

There are filtered cells and when I say things other than shift and down
keys it is copying hidden (filtered away) cells I believe.

I hope copying by selecting by "shiftt+down+down+down+down" will solve my
need.

Sorry for repating I just try to explain my need:
I filter the data by a macro.
Then I need to copy four cells apeering on the screen.

Thanks,

Cousin Excel
 
Reply With Quote
 
 
 
 
Eduardo
Guest
Posts: n/a
 
      15th Jan 2010
Hi,
Highlight the filtered data, press CTRL + G, special, in the right column
select "Visible cells Only", ok, then press CTRL + C, go to where you need to
paste the information and paste it

if this helps please click yes thanks

"CousinExcel" wrote:

> Thanks to Jacob Skaria.
> But still I need to mark and copy four cells by shift+down+down+down+down I
> believe.
>
> There are filtered cells and when I say things other than shift and down
> keys it is copying hidden (filtered away) cells I believe.
>
> I hope copying by selecting by "shiftt+down+down+down+down" will solve my
> need.
>
> Sorry for repating I just try to explain my need:
> I filter the data by a macro.
> Then I need to copy four cells apeering on the screen.
>
> Thanks,
>
> Cousin Excel

 
Reply With Quote
 
CousinExcel
Guest
Posts: n/a
 
      15th Jan 2010
Thank you Eduardo.
I need it in a macro.
Jacob Scaria has sent the statement

'ActiveCell.Resize(4).Select
'ActiveCell.Resize(4).Copy

it did not help me, maybe my lack of konowledge,
becuase that way the macro copies and pastes filtered away (hidden) cells as
well.
I need the macro to selecet and copy only four appearing cells


"Eduardo" wrote:

> Hi,
> Highlight the filtered data, press CTRL + G, special, in the right column
> select "Visible cells Only", ok, then press CTRL + C, go to where you need to
> paste the information and paste it
>
> if this helps please click yes thanks
>
> "CousinExcel" wrote:
>
> > Thanks to Jacob Skaria.
> > But still I need to mark and copy four cells by shift+down+down+down+down I
> > believe.
> >
> > There are filtered cells and when I say things other than shift and down
> > keys it is copying hidden (filtered away) cells I believe.
> >
> > I hope copying by selecting by "shiftt+down+down+down+down" will solve my
> > need.
> >
> > Sorry for repating I just try to explain my need:
> > I filter the data by a macro.
> > Then I need to copy four cells apeering on the screen.
> >
> > Thanks,
> >
> > Cousin Excel

 
Reply With Quote
 
Luke M
Guest
Posts: n/a
 
      15th Jan 2010
Is it always the same 4 cells? How do you if it the filter will only give 4
results?
If what you are really wanting is to select all the results from the filter,
something like this:

Range("A2:A100").SpecialCells(xlCellTypeVisible).Select
Selection.Copy

Where A2:A100 is the range you filtered, so that you won't get any extra
cells from the end of the workbook.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"CousinExcel" wrote:

> Thank you Eduardo.
> I need it in a macro.
> Jacob Scaria has sent the statement
>
> 'ActiveCell.Resize(4).Select
> 'ActiveCell.Resize(4).Copy
>
> it did not help me, maybe my lack of konowledge,
> becuase that way the macro copies and pastes filtered away (hidden) cells as
> well.
> I need the macro to selecet and copy only four appearing cells
>
>
> "Eduardo" wrote:
>
> > Hi,
> > Highlight the filtered data, press CTRL + G, special, in the right column
> > select "Visible cells Only", ok, then press CTRL + C, go to where you need to
> > paste the information and paste it
> >
> > if this helps please click yes thanks
> >
> > "CousinExcel" wrote:
> >
> > > Thanks to Jacob Skaria.
> > > But still I need to mark and copy four cells by shift+down+down+down+down I
> > > believe.
> > >
> > > There are filtered cells and when I say things other than shift and down
> > > keys it is copying hidden (filtered away) cells I believe.
> > >
> > > I hope copying by selecting by "shiftt+down+down+down+down" will solve my
> > > need.
> > >
> > > Sorry for repating I just try to explain my need:
> > > I filter the data by a macro.
> > > Then I need to copy four cells apeering on the screen.
> > >
> > > Thanks,
> > >
> > > Cousin Excel

 
Reply With Quote
 
CousinExcel
Guest
Posts: n/a
 
      15th Jan 2010
Hi Luke,
it is such a case, we know that there will be maximum 4 cells as result (or
we can assume that we will copy first four cells)

In your solution I have this problem:
For example I will copy to A2.
In A6, A7.... THERE ARE DATA.
If I make 100 as you suggested these A6, A7... are overwritten



"Luke M" wrote:

> Is it always the same 4 cells? How do you if it the filter will only give 4
> results?
> If what you are really wanting is to select all the results from the filter,
> something like this:
>
> Range("A2:A100").SpecialCells(xlCellTypeVisible).Select
> Selection.Copy
>
> Where A2:A100 is the range you filtered, so that you won't get any extra
> cells from the end of the workbook.
> --
> Best Regards,
>
> Luke M
> *Remember to click "yes" if this post helped you!*
>
>
> "CousinExcel" wrote:
>
> > Thank you Eduardo.
> > I need it in a macro.
> > Jacob Scaria has sent the statement
> >
> > 'ActiveCell.Resize(4).Select
> > 'ActiveCell.Resize(4).Copy
> >
> > it did not help me, maybe my lack of konowledge,
> > becuase that way the macro copies and pastes filtered away (hidden) cells as
> > well.
> > I need the macro to selecet and copy only four appearing cells
> >
> >
> > "Eduardo" wrote:
> >
> > > Hi,
> > > Highlight the filtered data, press CTRL + G, special, in the right column
> > > select "Visible cells Only", ok, then press CTRL + C, go to where you need to
> > > paste the information and paste it
> > >
> > > if this helps please click yes thanks
> > >
> > > "CousinExcel" wrote:
> > >
> > > > Thanks to Jacob Skaria.
> > > > But still I need to mark and copy four cells by shift+down+down+down+down I
> > > > believe.
> > > >
> > > > There are filtered cells and when I say things other than shift and down
> > > > keys it is copying hidden (filtered away) cells I believe.
> > > >
> > > > I hope copying by selecting by "shiftt+down+down+down+down" will solve my
> > > > need.
> > > >
> > > > Sorry for repating I just try to explain my need:
> > > > I filter the data by a macro.
> > > > Then I need to copy four cells apeering on the screen.
> > > >
> > > > Thanks,
> > > >
> > > > Cousin Excel

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying four filtered cells CousinExcel Microsoft Excel Misc 1 15th Jan 2010 04:14 PM
Copying filtered cells from a specific location kativa Microsoft Excel Programming 2 4th Apr 2008 01:31 PM
Copying into Filtered cells =?Utf-8?B?U25hcmE=?= Microsoft Excel Discussion 3 28th May 2007 06:03 PM
Question on macro (copying filtered selection into the newworkbook =?Utf-8?B?ZmJhZ2lyb3Y=?= Microsoft Excel Programming 1 13th Mar 2007 06:34 PM
Copying filtered, merged cells bennerob Microsoft Excel Worksheet Functions 1 15th Jul 2003 03:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:26 AM.