PC Review


Reply
Thread Tools Rate Thread

How do I coppy a range from 1 sheet to another via IF statement

 
 
=?Utf-8?B?am9obnNvbg==?=
Guest
Posts: n/a
 
      1st Sep 2007
In sheet 1 colom A to N I made some formulas.
In colom O I need a condition to be entered , either a Y or a N ( Yes or No ).
In sheet 2 I want to use an if statement to coppy range A to N from sheet 1,
if the condition is Y in the if statement.

I need to do this for a number of rows

The purpose of this program is to make a printable coppy on sheet 2 of all
the items that I chose in sheet one.


I use office XP pro
 
Reply With Quote
 
 
 
 
Damon Longworth
Guest
Posts: n/a
 
      1st Sep 2007
In sheet 1 add an autofilter. Filter on column O for all Y's. Now print
sheet 1. No need to use another sheet or copy to another range.

If you want code, record this process.

--

Damon Longworth

2007 Excel / Access User Conference
London, England - Currently rescheduled
St. Louis, Missouri - Oct 24-26, 2007
www.ExcelUserConference.com/


"johnson" <(E-Mail Removed)> wrote in message
news:BF8A595E-D71F-4B00-97D6-(E-Mail Removed)...
In sheet 1 colom A to N I made some formulas.
In colom O I need a condition to be entered , either a Y or a N ( Yes or
No ).
In sheet 2 I want to use an if statement to coppy range A to N from sheet 1,
if the condition is Y in the if statement.

I need to do this for a number of rows

The purpose of this program is to make a printable coppy on sheet 2 of all
the items that I chose in sheet one.


I use office XP pro


 
Reply With Quote
 
=?Utf-8?B?cDQ1Y2Fs?=
Guest
Posts: n/a
 
      1st Sep 2007
You could do it with If statements but if you just want "to make a printable
copy ~ of all the items that I chose in sheet one" then you might find it
easier to select any cell in your table, go to the menu toolbar and
Data|Filter|Autofilter
You should see the top (hopefully header) row with a lot of drop down menus.
Go to the one in column O and click on the down arrow and click on 'Y'.
You should now have a filtered list, which you can print out as you see it -
if necessary selecting the table and choosing Print|checking the 'Selection'
radio button, then OK.

If statements on sheet2 is a possible solution too, but complicated.

If you must have things on Sheet2 then vba solution is to run the following
macro after selecting any single block of cells in the table, as long as the
top and bottom rows of your selection are in the right place:
Sub blah()
With Sheets("Sheet1")
For rw = Selection.Row To Selection.Row + Selection.Rows.Count - 1
If .Cells(rw, "O") = "Y" Then
Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(1).Resize(, 14) = _
.Cells(rw, 1).Resize(, 14).Value
End If
Next rw
End With
End Sub

--
p45cal


"johnson" wrote:

> In sheet 1 colom A to N I made some formulas.
> In colom O I need a condition to be entered , either a Y or a N ( Yes or No ).
> In sheet 2 I want to use an if statement to coppy range A to N from sheet 1,
> if the condition is Y in the if statement.
>
> I need to do this for a number of rows
>
> The purpose of this program is to make a printable coppy on sheet 2 of all
> the items that I chose in sheet one.
>
>
> I use office XP pro

 
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
HELP CONSOLIDATING SAME RANGE EACH SHEET TO SEPARATE SHEET AND RANGE Microsoft Excel Misc 1 24th Jun 2005 06:31 PM
HELP CONSOLIDATING SAME RANGE EACH SHEET TO SEPARATE SHEET AND RANGE Microsoft Excel Programming 1 24th Jun 2005 05:57 PM
HELP CONSOLIDATING SAME RANGE EACH SHEET TO SEPARATE SHEET AND RANGE Microsoft Excel Worksheet Functions 0 24th Jun 2005 05:27 PM
how can i coppy setup from 1 HDD to another =?Utf-8?B?cmFmaXA=?= Windows XP New Users 2 26th Jul 2004 04:28 PM
coppy harddisk Twisted Windows XP Performance 5 17th Oct 2003 04:58 PM


Features
 

Advertising
 

Newsgroups
 


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