Thread: need help
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default need help

Looking futher, I don't think any data is in column C. Clcik with the mouse
any number in column C and then look at the functions box (fx) box at the top
of the worksheet to see that the data is really in column C.

"Jim May" wrote:

Joel;

I have tried and fully tested your code and it doesn't perform as expected.
I want **so bad** to understand looping **an this is a perfect example
that i wish to understand. Did you test it (your code)?

After I run it (the code) the results a
205-215 1234568 << only one line versus the expected 4 lines

Can you assist here?

TIA,

Jim May





"Joel" wrote:

Sub combinerows()

RowCount = 1

Do While Range("A" & (RowCount + 1)) < ""
HighNum = Range("A" & RowCount)
Do While Range("A" & (RowCount + 1)) < "" And _
Range("C" & (RowCount + 1)) = ""
HighNum = Range("A" & (RowCount + 1))
Rows(RowCount + 1).Delete
Loop
If Range("A" & RowCount) < HighNum Then
Range("A" & RowCount) = Range("A" & RowCount) & _
"-" & HighNum
Else
'convert column A to text
Range("A" & RowCount).NumberFormat = "@"
End If
RowCount = RowCount + 1
Loop

End Sub

"John" wrote:

in the column A is by order numbers. in column C is the parts number. between
one part number to the next part number there are empty box, the empty row
are inconsistent. is there anyway to make a macro to del the empty row
between the parts number and put the order number togehter. sample below...
sample: this is what I want to be:
205 1234568 |205-206 1234568
206 |207 1780009
207 1780009 |209-211 1190001
209 1190001 |212-215 11390008
210 |
211 |
212 11390008 |
213 |
214 |
215 |