#1
|
|||
|
|||
Move data from 1 cell to another cell
Hello again,
I am facing another interesting chalange, to move text from a worksheet containing different sets of text to another worksheet in the same workbook. I attach a sample workbook with details. Again, time is not my best friend I have to create a huge number of projects based on this operations. If you can ease my research with a starting clue, it will be a great help. |
#2
|
|||
|
|||
Well, i did find a solution....
Looks Like this: Sub NextAll() Dim col As Range, row As Range, Myrange As Range Set col = Worksheets("Foaie1").Range("J3") If Worksheets("Foaie1").Range("J3") = 10 Then Worksheets("Foaie2").Range("A3:A6").Copy Worksheets("Foaie1").Range("A3").PasteSpecial (xlPasteValues) Exit Sub End If Set Myrange = Range(Worksheets("Foaie2").Cells(3, col), Worksheets("Foaie2").Cells(6, col)) Myrange.Copy Worksheets("Foaie1").Range("A3").PasteSpecial (xlPasteValues) On Error GoTo 0 End Sub This macro depends on evaluation formula in cell "J3", which is: =IF(ISERROR(MATCH(A3;Foaie2!A3:I3;0)+1)=TRUE;0;MAT CH(A3;Foaie2!A3:I3;0)+1) To copy row by row instead of a range of rows, just change the copy range to 1 row I am sure there are better solutions... but this works fine for me, so I will give many thanks to me I will atach the file again for those interested. Have a great day |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to combine different cells data in one cell? | Learner7 | Excel | 1 | 07-28-2010 12:07 PM |
How can I fill cell color starting from Cell D5 using Conditional formatting instead | Learner7 | Excel | 0 | 07-08-2010 05:50 AM |
How can I make a cell color RED under the Today's date cell? | Learner7 | Excel | 2 | 07-08-2010 12:52 AM |
Copying data from one cell to another automatically | mrphilk | Excel | 4 | 06-10-2010 11:52 PM |
Auto-populate an MS Word table cell with text from a diff cell? | dreamrthts | Word Tables | 0 | 03-20-2009 01:49 PM |