Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a list of products listed on one worksheet, but not every product will have a value. In a separate worksheet I want it to only pull over the products that have values. I have been able to output the fist column of pizza but pizza-crust will not continue
Sheet 1 called prices list pizza pizza-crust pizza-thin pepper 1 5 8 beef 2 bacon 3 6 pineapple 4 9 mushroom 7 10 The macro that I have does the following list pizza pepper 1 beef 2 bacon 3 pineapple 4 how can i get it to fill in the data for the rest of the columns so that it would put pizza crust and then the data for each and then put pizza-thin and the data for that below is the macro Sub Button2_Click() Dim column As Integer column = 1 newrow = 1 Do Until Worksheets("sheet1").Cells(column, 1).Value = "" If Worksheets("sheet1").Cells(column, 2).Value < "" Then Worksheets("sheet2").Cells(newrow, 1).Value = Worksheets("sheet1").Cells(column, 1).Value Worksheets("sheet2").Cells(newrow, 2).Value = Worksheets("sheet1").Cells(column, 2).Value newrow = newrow + 1 End If column = column + 1 Loop End Sub thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
fill down empty cells at every change in value | Excel Worksheet Functions | |||
How can I program excel to shift data up to fill empty cells? | Excel Discussion (Misc queries) | |||
Fill empty cells | Excel Programming | |||
Fill empty cells | Excel Programming | |||
fill cell value to the next empty row | Excel Discussion (Misc queries) |