ycb
In support of this posting
https://eileenslounge.com/viewtopic....280747#p280747
befores
_____ Workbook: Workbook2_2b.xlsx ( Using Excel 2007 32 bit )
Worksheet: Destination
Row\Col A B C D E F G H I J K L M N O P Q R S T U V W X Y Z AA 1 Unique ID Gap Name Title Platform Salary Gap Total copy1 copy2 copy3 copy4 copy5 copy6 copy7 From SHEET2 Salary Total copy1 copy2 copy3 copy4 copy5 copy6 copy7 2 3 4 5 6 7 8 9 10 11
In support of this posting
https://eileenslounge.com/viewtopic....280747#p280747
_____ Workbook: Transfer data_marasAlan_2b.xlsm ( Using Excel 2007 32 bit )
Worksheet: Sheet1
Row\Col A B C D E F G H I J K L M N O P Q R S T U V W X Y Z AA AB AC AD AE AF AG 1 Number Unique ID Name Title Platform Filter Salary Add1 Add2 Add3 Add4 Add5 Add6 Add7 Add8 Add9 Add10 Add11 Add12 copy1 copy2 copy3 copy4 copy5 copy6 copy7 2 1 123 Ram Manager Java Filter2 £400 3 55 12 3 222 9 1 26 Som Operator C Filter2 £150 1,013 10 2 354 Sai Operator C++ Filter2 £150 23 2 24 1,126 17 2 563 Vidu Manager Java Filter2 £400 8 12 147 18 3 239 Jack Lead SQL Filter2 £300 45 4 4 8 4 149 19 4 222 Andy Operator Java Filter2 £150 4 14 8 151 24 2 333 Fran Operator SQL Filter2 £150 1 1 161 25 3 3658 Lalu Lead C Filter2 £300 6 6 6 6 1 1 2 163
In support of this posting
https://eileenslounge.com/viewtopic....280747#p280747
The after
_____ Workbook: Workbook2_2b.xlsx ( Using Excel 2007 32 bit )
Worksheet: Destination
Row\Col A B C D E F G H I J K L M N O P Q R S T U V W X Y Z AA 1 Unique ID Gap Name Title Platform Salary Gap Total copy1 copy2 copy3 copy4 copy5 copy6 copy7 From SHEET2 Salary Total copy1 copy2 copy3 copy4 copy5 copy6 copy7 2 123 Ram Manager Java £400 58 12 3 222 3 26 Som Operator C £150 0 1,013 4 354 Sai Operator C++ £150 25 24 1,126 5 563 Vidu Manager Java £400 0 8 12 147 6 239 Jack Lead SQL £300 45 4 4 8 4 149 7 222 Andy Operator Java £150 0 4 14 8 151 8 333 Fran Operator SQL £150 2 161 9 3658 Lalu Lead C £300 24 1 1 2 163 10 11
Macro for last 3 posts
Code:Option Explicit Sub Transfer_Sht1After() ' https://eileenslounge.com/viewtopic.php?p=280747#p280747 Rem 1 Source Worksheets info Dim Ws1 As Worksheet: Set Ws1 = ThisWorkbook.Worksheets.Item(1) Dim Lr1 As Long: Let Lr1 = Ws1.Range("B" & Ws1.Rows.Count & "").End(xlUp).Row '1b) Any column in the visible data is taken in the next code line, the main reason being as we need to get the row indicie info Dim Rng_v As Range: Set Rng_v = Ws1.Range("B1:B" & Lr1 & "").SpecialCells(xlCellTypeVisible) ' this gets just the range we see, so will be likely a range of lots of areas If Rng_v.Count = 1 Then ' case only header range visible MsgBox Prompt:="No rows to transfer.": Exit Sub Else ' there are visible rows to transfer Rem 2 building a single column array for the summed colums, and the wanted visible row indicies from the main range Dim aSum() As Variant: ReDim aSum(1 To Rng_v.Count - 1, 1 To 1) ' This will be a column array when applied to a worksheet Dim Rws() As Long: ReDim Rws(1 To Rng_v.Count - 1, 1 To 1) ' we need a "virtical" array containing the "seen" row indicies Dim Cel As Range For Each Cel In Rng_v ' These are the cells in the multi Area range of visible cells If Cel.Row > 1 And Cel.Value <> "" Then Dim I As Long Let I = I + 1 Let aSum(I, 1) = Evaluate("=Sum('[" & ThisWorkbook.Name & "]Sheet1'!O" & Cel.Row & ":'[" & ThisWorkbook.Name & "]Sheet1'!Z" & Cel.Row & ")") Let Rws(I, 1) = Cel.Row ' This puts the visible rows indicie in our array indicationg the rows we need from the worksheet Else End If Next Cel End If ' Destination workbook and worksheet Dim Pth As String: Let Pth = ThisWorkbook.Path & Application.PathSeparator ' Const Pth = "C:\Users\L026936\Desktop\Excel\" '<---- use own path Const Wnm = "Workbook2_2b.xlsx" 'your destination workbook2 name On Error Resume Next ' https://eileenslounge.com/viewtopic.php?f=30&t=35861&start=20 Dim WbDest As Workbook Set WbDest = Workbooks(Wnm) ' will error if workbook is not yet open If Err.Number > 0 Then Workbooks.Open Filename:=Pth & Wnm ' we test to see if we have an error and if we do themn we kknow to open the workbook On Error GoTo 0 Set WbDest = ActiveWorkbook Else End If ''2a) Column indicies of the columns wanted from the data worksheet Dim Clms() As Variant: Let Clms() = Array(2, 34, 3, 4, 5, 11, 34, 34, 27, 28, 29, 30, 31, 32, 33) '2b) Typical arrOut()=AppIndex(arrIn(), Rws(), Clms()) Let WbDest.Worksheets.Item(1).Range("B2").Resize(UBound(Rws(), 1), 15).Value2 = Application.Index(Ws1.Cells, Rws(), Clms()) '2c)(ii) Sums column Let WbDest.Worksheets.Item(1).Range("B2").Resize(UBound(Rws(), 1), 1).Offset(0, 7).Value2 = aSum() End Sub
Links relavent to the last 9 posts
Code:' https://www.excelforum.com/excel-programming-vba-macros/1338596-transferring-data.html#post5458446 ' _ First i wanted to filter column G from workbook 1 to "Filter 2" and transfer only filter 2 data to workbook 2. ' _ Then transferring like i wanted to transfer column C (source) to column B (destination) , column D to D, Column L to Column G, etc. ' _ I wanted to sum from column P to colum AA and transfer those sum to destination at column H ' _ Then copy from column AB to AH and paste in I to O in destination Sub Transfer_maras_1()
Here is a before and after…
https://excelfox.com/forum/showthrea...ll=1#post15278
https://excelfox.com/forum/showthrea...ll=1#post15279
Macro
https://excelfox.com/forum/showthrea...ll=1#post15277
Files
Transfer data_marasAlan_1.xlsm : https://app.box.com/s/p8kf5vo8jesql3n47sd1bzgm57qdpwdv
Workbook2_1.xlsx : https://app.box.com/s/3d9gmeb2nlyr4gg9q802kk5mjgze8cl5
_.________________________________________________ _________________________________________________
Code:Sub Transfer_marasAlan_2() '
Here is a before and after…
https://excelfox.com/forum/showthrea...ll=1#post15276
https://excelfox.com/forum/showthrea...ll=1#post15273
Macro
https://excelfox.com/forum/showthrea...ll=1#post15272
Files
Transfer data_marasAlan_2.xlsm : https://app.box.com/s/749a78z2ku4m1s1tg3fvgs1z1ud4s325
Workbook2_2.xlsx : https://app.box.com/s/13yh30a77spsluauck3nif309pic8fuz
_.___________________________________________
Here is a before and after…Code:Sub Transfer_marasAlan_3() ' https://www.excelforum.com/excel-programming-vba-macros/1338596-transferring-data.html#post5460624
https://excelfox.com/forum/showthrea...ll=1#post15269
https://excelfox.com/forum/showthrea...ll=1#post15270
Macro
https://excelfox.com/forum/showthrea...ge42#post15271
Files
https://excelfox.com/forum/showthrea...ge42#post15233
Transfer data_marasAlan_3.xlsm : https://app.box.com/s/p8kf5vo8jesql3n47sd1bzgm57qdpwdv
Workbook2_3.xlsx : https://app.box.com/s/y3rwvhfk3bo1rp9t7cgbk8yz3krymh23
Links relavent to the last 9 posts
Code:' https://www.excelforum.com/excel-programming-vba-macros/1338596-transferring-data.html#post5458446 ' _ First i wanted to filter column G from workbook 1 to "Filter 2" and transfer only filter 2 data to workbook 2. ' _ Then transferring like i wanted to transfer column C (source) to column B (destination) , column D to D, Column L to Column G, etc. ' _ I wanted to sum from column P to colum AA and transfer those sum to destination at column H ' _ Then copy from column AB to AH and paste in I to O in destination Sub Transfer_maras_1()
Here is a before and after…
https://excelfox.com/forum/showthrea...ll=1#post15278
https://excelfox.com/forum/showthrea...ll=1#post15279
Macro
https://excelfox.com/forum/showthrea...ll=1#post15277
Files
Transfer data_marasAlan_1.xlsm : https://app.box.com/s/p8kf5vo8jesql3n47sd1bzgm57qdpwdv
Workbook2_1.xlsx : https://app.box.com/s/3d9gmeb2nlyr4gg9q802kk5mjgze8cl5
_.________________________________________________ _________________________________________________
Code:Sub Transfer_marasAlan_2() '
Here is a before and after…
https://excelfox.com/forum/showthrea...ll=1#post15276
https://excelfox.com/forum/showthrea...ll=1#post15273
Macro
https://excelfox.com/forum/showthrea...ll=1#post15272
Files
Transfer data_marasAlan_2.xlsm : https://app.box.com/s/749a78z2ku4m1s1tg3fvgs1z1ud4s325
Workbook2_2.xlsx : https://app.box.com/s/13yh30a77spsluauck3nif309pic8fuz
_.___________________________________________
Here is a before and after…Code:Sub Transfer_marasAlan_3() ' https://www.excelforum.com/excel-programming-vba-macros/1338596-transferring-data.html#post5460624
https://excelfox.com/forum/showthrea...ll=1#post15269
https://excelfox.com/forum/showthrea...ll=1#post15270
Macro
https://excelfox.com/forum/showthrea...ge42#post15271
Files
https://excelfox.com/forum/showthrea...ge42#post15233
Transfer data_marasAlan_3.xlsm : https://app.box.com/s/p8kf5vo8jesql3n47sd1bzgm57qdpwdv
Workbook2_3.xlsx : https://app.box.com/s/y3rwvhfk3bo1rp9t7cgbk8yz3krymh23
Links relavent to the last 9 posts
Code:' https://www.excelforum.com/excel-programming-vba-macros/1338596-transferring-data.html#post5458446 ' _ First i wanted to filter column G from workbook 1 to "Filter 2" and transfer only filter 2 data to workbook 2. ' _ Then transferring like i wanted to transfer column C (source) to column B (destination) , column D to D, Column L to Column G, etc. ' _ I wanted to sum from column P to colum AA and transfer those sum to destination at column H ' _ Then copy from column AB to AH and paste in I to O in destination Sub Transfer_maras_1()
Here is a before and after…
https://excelfox.com/forum/showthrea...ll=1#post15278
https://excelfox.com/forum/showthrea...ll=1#post15279
Macro
https://excelfox.com/forum/showthrea...ll=1#post15277
Files
Transfer data_marasAlan_1.xlsm : https://app.box.com/s/p8kf5vo8jesql3n47sd1bzgm57qdpwdv
Workbook2_1.xlsx : https://app.box.com/s/3d9gmeb2nlyr4gg9q802kk5mjgze8cl5
_.________________________________________________ _________________________________________________
Code:Sub Transfer_marasAlan_2() '
Here is a before and after…
https://excelfox.com/forum/showthrea...ll=1#post15276
https://excelfox.com/forum/showthrea...ll=1#post15273
Macro
https://excelfox.com/forum/showthrea...ll=1#post15272
Files
Transfer data_marasAlan_2.xlsm : https://app.box.com/s/749a78z2ku4m1s1tg3fvgs1z1ud4s325
Workbook2_2.xlsx : https://app.box.com/s/13yh30a77spsluauck3nif309pic8fuz
_.___________________________________________
Here is a before and after…Code:Sub Transfer_marasAlan_3() ' https://www.excelforum.com/excel-programming-vba-macros/1338596-transferring-data.html#post5460624
https://excelfox.com/forum/showthrea...ll=1#post15269
https://excelfox.com/forum/showthrea...ll=1#post15270
Macro
https://excelfox.com/forum/showthrea...ge42#post15271
Files
https://excelfox.com/forum/showthrea...ge42#post15233
Transfer data_marasAlan_3.xlsm : https://app.box.com/s/p8kf5vo8jesql3n47sd1bzgm57qdpwdv
Workbook2_3.xlsx : https://app.box.com/s/y3rwvhfk3bo1rp9t7cgbk8yz3krymh23
Links relavent to the last 9 posts
Code:' https://www.excelforum.com/excel-programming-vba-macros/1338596-transferring-data.html#post5458446 ' _ First i wanted to filter column G from workbook 1 to "Filter 2" and transfer only filter 2 data to workbook 2. ' _ Then transferring like i wanted to transfer column C (source) to column B (destination) , column D to D, Column L to Column G, etc. ' _ I wanted to sum from column P to colum AA and transfer those sum to destination at column H ' _ Then copy from column AB to AH and paste in I to O in destination Sub Transfer_maras_1()
Here is a before and after…
https://excelfox.com/forum/showthrea...ll=1#post15278
https://excelfox.com/forum/showthrea...ll=1#post15279
Macro
https://excelfox.com/forum/showthrea...ll=1#post15277
Files
Transfer data_marasAlan_1.xlsm : https://app.box.com/s/p8kf5vo8jesql3n47sd1bzgm57qdpwdv
Workbook2_1.xlsx : https://app.box.com/s/3d9gmeb2nlyr4gg9q802kk5mjgze8cl5
_.________________________________________________ _________________________________________________
Code:Sub Transfer_marasAlan_2() '
Here is a before and after…
https://excelfox.com/forum/showthrea...ll=1#post15276
https://excelfox.com/forum/showthrea...ll=1#post15273
Macro
https://excelfox.com/forum/showthrea...ll=1#post15272
Files
Transfer data_marasAlan_2.xlsm : https://app.box.com/s/749a78z2ku4m1s1tg3fvgs1z1ud4s325
Workbook2_2.xlsx : https://app.box.com/s/13yh30a77spsluauck3nif309pic8fuz
_.___________________________________________
Here is a before and after…Code:Sub Transfer_marasAlan_3() ' https://www.excelforum.com/excel-programming-vba-macros/1338596-transferring-data.html#post5460624
https://excelfox.com/forum/showthrea...ll=1#post15269
https://excelfox.com/forum/showthrea...ll=1#post15270
Macro
https://excelfox.com/forum/showthrea...ge42#post15271
Files
https://excelfox.com/forum/showthrea...ge42#post15233
Transfer data_marasAlan_3.xlsm : https://app.box.com/s/p8kf5vo8jesql3n47sd1bzgm57qdpwdv
Workbook2_3.xlsx : https://app.box.com/s/y3rwvhfk3bo1rp9t7cgbk8yz3krymh23
Links relavent to the last 9 posts
Code:' https://www.excelforum.com/excel-programming-vba-macros/1338596-transferring-data.html#post5458446 ' _ First i wanted to filter column G from workbook 1 to "Filter 2" and transfer only filter 2 data to workbook 2. ' _ Then transferring like i wanted to transfer column C (source) to column B (destination) , column D to D, Column L to Column G, etc. ' _ I wanted to sum from column P to colum AA and transfer those sum to destination at column H ' _ Then copy from column AB to AH and paste in I to O in destination Sub Transfer_maras_1()
Here is a before and after…
https://excelfox.com/forum/showthrea...ll=1#post15278
https://excelfox.com/forum/showthrea...ll=1#post15279
Macro
https://excelfox.com/forum/showthrea...ll=1#post15277
Files
Transfer data_marasAlan_1.xlsm : https://app.box.com/s/p8kf5vo8jesql3n47sd1bzgm57qdpwdv
Workbook2_1.xlsx : https://app.box.com/s/3d9gmeb2nlyr4gg9q802kk5mjgze8cl5
_.________________________________________________ _________________________________________________
Code:Sub Transfer_marasAlan_2() '
Here is a before and after…
https://excelfox.com/forum/showthrea...ll=1#post15276
https://excelfox.com/forum/showthrea...ll=1#post15273
Macro
https://excelfox.com/forum/showthrea...ll=1#post15272
Files
Transfer data_marasAlan_2.xlsm : https://app.box.com/s/749a78z2ku4m1s1tg3fvgs1z1ud4s325
Workbook2_2.xlsx : https://app.box.com/s/13yh30a77spsluauck3nif309pic8fuz
_.___________________________________________
Here is a before and after…Code:Sub Transfer_marasAlan_3() ' https://www.excelforum.com/excel-programming-vba-macros/1338596-transferring-data.html#post5460624
https://excelfox.com/forum/showthrea...ll=1#post15269
https://excelfox.com/forum/showthrea...ll=1#post15270
Macro
https://excelfox.com/forum/showthrea...ge42#post15271
Files
https://excelfox.com/forum/showthrea...ge42#post15233
Transfer data_marasAlan_3.xlsm : https://app.box.com/s/p8kf5vo8jesql3n47sd1bzgm57qdpwdv
Workbook2_3.xlsx : https://app.box.com/s/y3rwvhfk3bo1rp9t7cgbk8yz3krymh23
Bookmarks