LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default transpose loop

balu,

Try the macro below.

HTH,
Bernie
MS Excel MVP

Sub BaluTranspose()
Dim myR As Range
Dim myF As Range
Dim myC As Range
Dim myRow As Long

With Worksheets("Sheet1")
Set myR = Intersect(.Range("A:A"), .UsedRange)
End With
With Worksheets("Sheet2")
Set myF = Intersect(.Range("A:A"), .UsedRange)
For Each myC In myR
If Not IsError(Application.Match(myC.Value, myF, False)) Then
myRow = Application.WorksheetFunction.Match(myC.Value, myF, False)
.Cells(myRow, Columns.Count).End(xlToLeft)(1, 2).Value = myC(1, 2).Value
End If
Next myC
End With

End Sub

"balu" wrote in message
...
dears,
im accessing excel through access by creating excel object and copyd some
access query to sheet1 columns A and B
now i want is like this WAY
COPY all the cell values of sheet1!columnB where sheet1!columnA.values =
sheet2!cellA1 next COPY all the cell values of sheet1!columnB where
sheet1!columnA.value = sheet2!cellA2 and so on until sheet2!columnA having
values
(2) then copyd cell values of the ranges from sheet1 will be transposed on
to sheet2 columnB rows
can any one help me please



 
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
Loop to Filter, Name Sheets. If Blank, Exit Loop ryguy7272 Excel Programming 3 February 5th 08 03:41 PM
(Complex) Loop within loop to create worksheets klysell Excel Programming 1 March 20th 07 12:03 AM
Loop and transpose sets of data Sach Excel Programming 2 January 31st 06 07:17 AM
I WANT TO TRANSPOSE LINKS, AS WE TRANSPOSE VALUES Umair Aslam Excel Worksheet Functions 1 September 22nd 05 01:19 PM
Advancing outer Loop Based on criteria of inner loop ExcelMonkey Excel Programming 1 August 15th 05 05:23 PM


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