had to modify slightly to just do last row, but works perfectly now, thank
you very super much to both of you.
"Jacob Skaria" wrote:
> Thanks Rick
>
> Dear Miree..Sorry, you have not mentioned about Selection.FormulaR1C1 = ".."
> in your initial post. The code which we have posted will satisfy the
> requirement mentioned "Search up from last row"..
>
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Miree" wrote:
>
> > Im sorry all this coding is new to me, I am trying to learn as I go, and
> > because of this I dont understand some basics. Most of what I get is copied
> > and paste from else where, i dont understand what it does but know it does
> > what i need it to.
> >
> > What I am trying to do is select the last row + 1 and then apply this to it
> > Cells.Select
> > Selection.SpecialCells(xlCellTypeBlanks).Select
> > Selection.FormulaR1C1 = ".."
> >
> > although this line finds the row i need, how can i get it to select it?
> >
> > RowAfterLastDataInA = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row + 1
> >
> > "Rick Rothstein" wrote:
> >
> > > Jacob gave you that (well, except for the "one down from" part). Jacob
> > > posted this...
> > >
> > > lngRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
> > >
> > > which is the row containing the last piece of data in Column A. Since you
> > > want one down from this, just add one to it...
> > >
> > > RowAfterLastDataInA = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row + 1
> > >
> > > --
> > > Rick (MVP - Excel)
> > >
> > >
> > > "Miree" <(E-Mail Removed)> wrote in message
> > > news:EFB93462-16D9-407D-B099-(E-Mail Removed)...
> > > > sorry this didnt work, what i think might be eaisier(for my simple midnd)
> > > > is
> > > > if you could help me with a code to identify and select the row one down
> > > > from
> > > > the last data point in column A
> > > >
> > > > "Jacob Skaria" wrote:
> > > >
> > > >> Dim lngTemp, lngRow
> > > >>
> > > >> lngRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
> > > >>
> > > >> For lngTemp = lngRow To 1 Step -1
> > > >> If InStr(Range("DT" & lngTemp), UCase(UserForm7.TextBox2.Text)) = 0
> > > >> Then
> > > >> Activesheet.Cells(lngTemp).EntireRow.Delete
> > > >> End If
> > > >> Next lngTemp
> > > >>
> > > >> If this post helps click Yes
> > > >> ---------------
> > > >> Jacob Skaria
> > > >>
> > > >>
> > > >> "Miree" wrote:
> > > >>
> > > >> > I need to modify my code to search from the last row, at the moment it
> > > >> > only
> > > >> > goes from the last row there is data in for my specific column(DT), can
> > > >> > I
> > > >> > make it start from the last row where there is data from column A but
> > > >> > only
> > > >> > searching the column i need(DT)
> > > >> >
> > > >> > Dim rng As Range
> > > >> > Dim i As Long
> > > >> >
> > > >> > Set rng = ActiveSheet.Range(Cells(1, "DT"), Cells(Rows.Count,
> > > >> > "DT").End(xlUp))
> > > >> >
> > > >> > With rng
> > > >> > For i = .Rows.Count To 1 Step -1
> > > >> > If InStr(UCase(.Cells(i)), UCase(UserForm7.TextBox2.Text)) = 0
> > > >> > Then
> > > >> > .Cells(i).EntireRow.Delete
> > > >> > End If
> > > >> > Next i
> > > >> > End With
> > > >> >
> > > >> > Thank you in advance
> > >
> > >
|