LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Help on VBA and Excel

Give this one a go...

Mark Ivey

Sub createSummary()
Dim i As Long
Dim j As Long
Dim k As Long

Sheets(1).Select

LastRow = Sheets(1).Range("A65536").End(xlUp).Row

LastCol = Sheets(1).Range("IV1").End(xlToLeft).Column

k = 1

For i = 1 To LastRow
For j = 2 To LastCol
If Cells(i, j).Value 0 Then
Sheets(2).Cells(k, 1).Value = Sheets(1).Cells(i, 1).Value
Sheets(2).Cells(k, 2).Value = Sheets(1).Cells(i, j).Value
k = k + 1
End If
Next
Next

End Sub








"AK" wrote in message
...
Hallo,
I am not a VBA/Excel programmer, so I would like your help.
The below is what I have. Three columns of Excel in Sheet1.
A B C
---------------------------------------------------
John $30 $0
Smith $20 $10

What I want to do is the following in Sheet2.
A B
--------------------------------
John $30
Smith $20
Smith $10

How would I do it? I'd like your help.

Thanks in advance.

Kumar


 
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



All times are GMT +1. The time now is 08:27 AM.

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"