#1   Report Post  
Posted to microsoft.public.excel.misc
FR
 
Posts: n/a
Default Excel/VBA

Help!!! Excel/VBA
The need: To collapse a spreadsheet by deleting irrelevant rows conditioned
on a cell in the row.
Question 1: Is there an intrinsic way of doing this built into Excel?
Question 2: I am trying to do it with VBA by cutting and pasting rows as
follows :
ActiveSheet.Rows("(SrcRow)").Cut
ActiveSheet.Rows("(DsrRow)").Paste
I keep getting €śType mismatch error€ť messages. I tried other variations but
I get the impression that €śCut€ť and €śPaste€ť and €śRows€ť and €śRange€ť only
accept constants to designate a range, not variables.

What am I doing wrong?

Thanks, Robert Hollo

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Excel/VBA

No idea what you are doing, but assuming that SrcRow and DsrRow are range
variables, perhaps

ActiveSheet.Rows(SrcRow).Cut
ActiveSheet.Rows(DsrRow).Paste


--

HTH

RP
(remove nothere from the email address if mailing direct)


"FR" wrote in message
...
Help!!! Excel/VBA
The need: To collapse a spreadsheet by deleting irrelevant rows

conditioned
on a cell in the row.
Question 1: Is there an intrinsic way of doing this built into Excel?
Question 2: I am trying to do it with VBA by cutting and pasting rows as
follows :
ActiveSheet.Rows("(SrcRow)").Cut
ActiveSheet.Rows("(DsrRow)").Paste
I keep getting "Type mismatch error" messages. I tried other variations

but
I get the impression that "Cut" and "Paste" and "Rows" and "Range" only
accept constants to designate a range, not variables.

What am I doing wrong?

Thanks, Robert Hollo



  #3   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Excel/VBA


Maybe........ Data Filter AutoFilter, then select the value of interest
in the column of interest and filter..........then delete those rows

Vaya con Dios,
Chuck, CABGx3



"FR" wrote:

Help!!! Excel/VBA
The need: To collapse a spreadsheet by deleting irrelevant rows conditioned
on a cell in the row.
Question 1: Is there an intrinsic way of doing this built into Excel?
Question 2: I am trying to do it with VBA by cutting and pasting rows as
follows :
ActiveSheet.Rows("(SrcRow)").Cut
ActiveSheet.Rows("(DsrRow)").Paste
I keep getting €śType mismatch error€ť messages. I tried other variations but
I get the impression that €śCut€ť and €śPaste€ť and €śRows€ť and €śRange€ť only
accept constants to designate a range, not variables.

What am I doing wrong?

Thanks, Robert Hollo

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel/VBA programming Carlos A Excel Discussion (Misc queries) 2 July 24th 05 10:21 PM


All times are GMT +1. The time now is 08:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"