Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default can I pull only data from a sheet greater then 0

Dear Expert

I'm trying to pull data from a seperate sheet to another to create
labour coverage chart. I would like to pull it over without bringin
any rows with 0 values so that there are no empty spaces in th
chart. when i try an if equation to do this it just doubles the dat
between 0's
the data would originally look like thi

name in ou
joe 9:00 15:0
dav
mike
chris 12:00 20:0

I would like to pull the data to the chart page so that it come
across to a set sized data table like thi

name in duratio
joe 9:00 6:0
chris 12:00 8:0

I would appreciate anyone assistance in this matter

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default can I pull only data from a sheet greater then 0

Hi bpman,

Sub CopyNonBlank()
Dim rngUsed As Range
Dim rngToCopy As Range
Dim shtNew As Worksheet

'assumes the range you wish to copy is in Sheet1
Set rngUsed = Worksheets("Sheet1").UsedRange

Dim cell As Range

' Test for non-blank cells in column 2 of the range
' if the test is successful
' put entire row in a holding range rngToCopy
For Each cell In rngUsed.Columns(2).Cells
If Not IsEmpty(cell.Value) Then
If rngToCopy Is Nothing Then
Set rngToCopy = cell.EntireRow
Else
Set rngToCopy = Union(rngToCopy, cell.EntireRow)
End If
End If
Next

' add a sheet and copy the range
Set shtNew = Sheets.Add(Type:=xlWorksheet)
rngToCopy.Copy shtNew.Range("A1")
End Sub

Ed Ferrero

I'm trying to pull data from a seperate sheet to another to create a
labour coverage chart. I would like to pull it over without bringing
any rows with 0 values so that there are no empty spaces in the
chart. when i try an if equation to do this it just doubles the data
between 0's.
the data would originally look like this

name in out
joe 9:00 15:00
dave
mike
chris 12:00 20:00

I would like to pull the data to the chart page so that it comes
across to a set sized data table like this

name in duration
joe 9:00 6:00
chris 12:00 8:00

I would appreciate anyone assistance in this matter.



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
How do I pull data from one sheet and place it in another? Fred Excel Discussion (Misc queries) 7 April 28th 09 02:30 AM
Pull Data from one sheet to another Dax Arroway Excel Worksheet Functions 1 November 20th 08 02:44 AM
How do I use a formula on wk sheet 2 to pull data from wk sheet 1 WFG3000 Excel Discussion (Misc queries) 1 December 13th 07 06:58 AM
VLookup / pull data from 1 sheet to another nastech Excel Discussion (Misc queries) 1 June 20th 07 08:30 PM
pull data from sheet two, then fill in the data to sheet one (part Jim Excel Worksheet Functions 3 December 11th 04 04:51 AM


All times are GMT +1. The time now is 08:30 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"