Prev: Removing Command Button
Next: Trying to Modify Excel code; Pointing to SQL Server Instead of Acc
From: ryguy7272 on 6 May 2010 01:06 I like that code Rich!! Nice job!!! -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "JLGWhiz" wrote: > The OP did not define the type of data that is in Col A or Col B. It is > difficult to tell if Col A consists of names and numbers or just name or > just numbers. It is inferred that Col B consists of names but it could be a > number or it could be both. In neither case does it define what data is > located where within the cell, nor how it is delimited if there is a > combination of names and numbers. So, IMHO, it is futile to offer any code > for accomplishing the task. > > > "Rich Locus" <RichLocus(a)discussions.microsoft.com> wrote in message > news:94ED6C4B-D8B9-49A9-8BC3-D6EF7BD6DB4E(a)microsoft.com... > > Hello: > > I think I misunderstood your question in my last post. This version will > > see if there is a name in Column B, and if there is a name, it won't copy > > the > > phone number to Column C. > > > > Option Explicit > > > > Public Sub LastRow() > > Dim intLastRowColumnA As Long > > Dim intColumnAPtr As Long > > Dim intColumnCPtr As Long > > > > intColumnCPtr = 0 > > > > ' ********************************** > > ' Locate Last Row for Column A > > ' ********************************** > > intLastRowColumnA = Cells(Rows.Count, "A").End(xlUp).Row > > > > ' ******************************************************** > > ' If Column B Has A Name, Don't Copy The Phone Number to C > > ' ******************************************************** > > For intColumnAPtr = 1 To intLastRowColumnA > > If Cells(intColumnAPtr, 2).Value = "" Then > > intColumnCPtr = intColumnCPtr + 1 > > Cells(intColumnCPtr, 3).Value = Cells(intColumnAPtr, 1).Value > > End If > > Next intColumnAPtr > > > > End Sub > > > > -- > > Rich Locus > > Logicwurks, LLC > > > > > > "asol" wrote: > > > >> hi all > >> > >> i have in raw A phone list in raw B we have customer that ask to be > >> removed > >> from call list > >> what can i do to have clean list in raw C > > > . >
From: Rich Locus on 6 May 2010 17:01 ryguy7272: I thought your code to hide the rows was also very cool!!! Rich -- Rich Locus Logicwurks, LLC "ryguy7272" wrote: > I like that code Rich!! Nice job!!! > > -- > Ryan--- > If this information was helpful, please indicate this by clicking ''Yes''. > > > "JLGWhiz" wrote: > > > The OP did not define the type of data that is in Col A or Col B. It is > > difficult to tell if Col A consists of names and numbers or just name or > > just numbers. It is inferred that Col B consists of names but it could be a > > number or it could be both. In neither case does it define what data is > > located where within the cell, nor how it is delimited if there is a > > combination of names and numbers. So, IMHO, it is futile to offer any code > > for accomplishing the task. > > > > > > "Rich Locus" <RichLocus(a)discussions.microsoft.com> wrote in message > > news:94ED6C4B-D8B9-49A9-8BC3-D6EF7BD6DB4E(a)microsoft.com... > > > Hello: > > > I think I misunderstood your question in my last post. This version will > > > see if there is a name in Column B, and if there is a name, it won't copy > > > the > > > phone number to Column C. > > > > > > Option Explicit > > > > > > Public Sub LastRow() > > > Dim intLastRowColumnA As Long > > > Dim intColumnAPtr As Long > > > Dim intColumnCPtr As Long > > > > > > intColumnCPtr = 0 > > > > > > ' ********************************** > > > ' Locate Last Row for Column A > > > ' ********************************** > > > intLastRowColumnA = Cells(Rows.Count, "A").End(xlUp).Row > > > > > > ' ******************************************************** > > > ' If Column B Has A Name, Don't Copy The Phone Number to C > > > ' ******************************************************** > > > For intColumnAPtr = 1 To intLastRowColumnA > > > If Cells(intColumnAPtr, 2).Value = "" Then > > > intColumnCPtr = intColumnCPtr + 1 > > > Cells(intColumnCPtr, 3).Value = Cells(intColumnAPtr, 1).Value > > > End If > > > Next intColumnAPtr > > > > > > End Sub > > > > > > -- > > > Rich Locus > > > Logicwurks, LLC > > > > > > > > > "asol" wrote: > > > > > >> hi all > > >> > > >> i have in raw A phone list in raw B we have customer that ask to be > > >> removed > > >> from call list > > >> what can i do to have clean list in raw C > > > > > > . > >
First
|
Prev
|
Pages: 1 2 Prev: Removing Command Button Next: Trying to Modify Excel code; Pointing to SQL Server Instead of Acc |