Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default spread sheet problem

I have a sheet in which we are able to insert quantities of certain parts.
I am trying to create a second sheet that if I put in a quanity on the first
sheet it will put that many rows on the second sheet. If a part has a
quantity of zero I want that part to not even show up on the second
sheet.(see below)

first sheet
QTY Part
2 Furances
0 heaters
3 Fans

second sheet
______ Furnaces
______ Furnaces
______ Fans
______ Fans
______ Fans

-We fill in the blanks by hand in the second page
Thanks for your help





--
mb
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default spread sheet problem

Try this macro:

HTH



Sub addData()

Dim rng As Range
Dim ws1 As Worksheet, ws2 As Worksheet
Dim i As Long, j As Long

Set ws1 = Worksheets("Sheet1")
Set ws2 = Worksheets("Sheet2")
Set rng = ws2.Cells(2, "B")

With ws1
lastrow = .Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To lastrow
For j = 1 To .Cells(i, "A")
rng = .Cells(i, "B")
Set rng = rng.Offset(1, 0)
Next j
Next i
End With
End Sub

"mbruck102369" wrote:

I have a sheet in which we are able to insert quantities of certain parts.
I am trying to create a second sheet that if I put in a quanity on the first
sheet it will put that many rows on the second sheet. If a part has a
quantity of zero I want that part to not even show up on the second
sheet.(see below)

first sheet
QTY Part
2 Furances
0 heaters
3 Fans

second sheet
______ Furnaces
______ Furnaces
______ Fans
______ Fans
______ Fans

-We fill in the blanks by hand in the second page
Thanks for your help





--
mb

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 enter a bull call spread into the options spread sheet ? alvin smith Excel Worksheet Functions 0 November 27th 06 01:23 AM
spread sheet equality 547 Charts and Charting in Excel 1 May 2nd 06 11:10 AM
spread sheet equality 547 Charts and Charting in Excel 0 May 2nd 06 02:02 AM
how to do a spread sheet olajune1 Excel Worksheet Functions 2 November 4th 05 04:56 PM
Spread sheet HELP! califman1961 New Users to Excel 1 February 18th 05 06:55 PM


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