Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How do I coppy a range from 1 sheet to another via IF statement

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 145
Default How do I coppy a range from 1 sheet to another via IF statement

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" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default How do I coppy a range from 1 sheet to another via IF statement

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
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
Coppy formula using OFFSET Eric_G Excel Worksheet Functions 4 March 7th 09 04:17 PM
Macro to coppy cells to certain rows depending on value in cell Esrei Excel Discussion (Misc queries) 0 December 9th 05 07:57 AM
HELP CONSOLIDATING SAME RANGE EACH SHEET TO SEPARATE SHEET AND RANGE Excel Discussion (Misc queries) 1 June 24th 05 06:31 PM
HELP CONSOLIDATING SAME RANGE EACH SHEET TO SEPARATE SHEET AND RANGE No Name Excel Programming 1 June 24th 05 05:57 PM
HELP CONSOLIDATING SAME RANGE EACH SHEET TO SEPARATE SHEET AND RANGE Excel Worksheet Functions 0 June 24th 05 05:27 PM


All times are GMT +1. The time now is 09:19 PM.

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

About Us

"It's about Microsoft Excel"