boblarson
02-04-2009, 11:22 AM
How to put in a question????
|
View Full Version : how to movenext boblarson 02-04-2009, 11:22 AM How to put in a question???? wiklendt 02-04-2009, 03:46 PM huh?? . Bilbo_Baggins_Esq 02-04-2009, 05:52 PM huh?? . ditto ??? Mike375 02-04-2009, 06:03 PM I just searched on Google for...movenext excel....and this thread was about the 5th link that came up.:) ajetrumpet 02-04-2009, 07:54 PM how To Put In A Question????wth Bob???? smiler44 02-05-2009, 01:41 PM Well, to most that have replied, thank you for such "friendly" responses. I notice that my question did not appear, only the title. I have solved the problem myself but the problem I was having :- If I select cell A1 and wish to move to cell A2, A3 etc how do I movenext? boblarson 02-05-2009, 01:45 PM Well, to most that have replied, thank you for such "friendly" responses. I notice that my question did not appear, only the title. I have solved the problem myself but the problem I was having :- If I select cell A1 and wish to move to cell A2, A3 etc how do I movenext? Ah, that would have been useful :) So I'm sure you already found Activecell.Offset(0,1).Select right? ajetrumpet 02-05-2009, 04:42 PM Activecell.Offset(0,1).Select Very good Bob! :) smiler44 02-07-2009, 06:32 AM Ah, that would have been useful :) So I'm sure you already found Activecell.Offset(0,1).Select right? Bob, I would like to say yes that is they way I managed to movenext but it would not be true. I used a lot more code. Thank you for the reply and correct method on how to do it. smiler44 wiklendt 02-08-2009, 01:56 PM smiler44, it would benefit a lot of people on this forum if you could post your working code and/or how you managed to get this working for you. smiler44 02-10-2009, 09:20 AM Wiklendt, no problem, here it is. I need to hide the 2nd, 3rd instance of any cell/ row that is duplicated. I compare cell A1 with A2. in no match is found then compare A2 with A3 and so on. If a match is found between A1 and A2 then hide row 2 and compare A1 with A3, if a match is found then hide A3 if no match found then compare A3 with A4. Private Sub cmdfinduplicates_Click() ' find duplicates and hides all but 1 row. '''''''''''''''''''''''' Dim counter1 As Integer Dim col1 As String ' column Dim sell1 As String ' cell Dim pap1 As String Dim counter As Integer Dim col As String ' column Dim sell As String Dim pap As String 'cell Range("a1").Select Sheet1.TextBox1.Text = "." counter1 = 1 counter = 2 pap1 = "a1" Do Until Sheet1.TextBox1.Text = "" pause (0.25) col1 = "a" sell1 = counter1 pap1 = col1 + sell1 Sheet1.TextBox1.Text = Range(pap1) counter1 = counter1 + 1 pause (".25") '''''''''''''''''''''' col = "a" sell = counter pap = col + sell Sheet1.TextBox2.Text = Range(pap) counter = counter + 1 pause (".25") If TextBox1.Text = "" Then 'must have got to end of field MsgBox ("exiting sub") Exit Sub End If If TextBox1.Text = TextBox2.Text Then ' hide duplicate rom Rows(sell).Select Selection.EntireRow.Hidden = True MsgBox ("row test hidden") Else End If Loop MsgBox ("all done") End Sub wiklendt 02-10-2009, 11:55 AM cool :) you done good, smiler44. |