Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False Dim rngFound As Range On Error Resume Next With Worksheets("Data").Range("A:A") Set rngFound = .Find(What:=Me.TextBox1.Value, After:=.Cells(1), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, Matchbyte:=False) ' HOW CAN I FIND THE 1ST EMPTY ("") CELL IN THE rngfound.offset(0,x) ROW ? ' I want to place some Textbox values into the First Blank Cell in the Same Row as the (RNGFOUND) but do not know how to Add this in. ' Say for instance: 1st Blank Cell in Row: textbxo1.value = rngfound(0,ISEMPTY).value ' Other code here Application.ScreenUpdating = True End Sub Corey.... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
corey
since you're going to be in column a, row rngfound.row, if you then use dim FirstBlank as range set FirstBlank = worksheets("Data").range(rngFound).end(xltoright). offset(0,1) textbox1.value = firstblank that will be the 1st empty cell in rngFound but this will only work if it is TRULY empty, not just blank with a formula in it. this is untested but should get you started.......... hth susan On Mar 20, 8:14 am, "Coza" wrote: Private Sub CommandButton1_Click() Application.ScreenUpdating = False Dim rngFound As Range On Error Resume Next With Worksheets("Data").Range("A:A") Set rngFound = .Find(What:=Me.TextBox1.Value, After:=.Cells(1), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, Matchbyte:=False) ' HOW CAN I FIND THE 1ST EMPTY ("") CELL IN THE rngfound.offset(0,x) ROW ? ' I want to place some Textbox values into the First Blank Cell in the Same Row as the (RNGFOUND) but do not know how to Add this in. ' Say for instance: 1st Blank Cell in Row: textbxo1.value = rngfound(0,ISEMPTY).value ' Other code here Application.ScreenUpdating = True End Sub Corey.... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks
"Susan" wrote in message oups.com... corey since you're going to be in column a, row rngfound.row, if you then use dim FirstBlank as range set FirstBlank = worksheets("Data").range(rngFound).end(xltoright). offset(0,1) textbox1.value = firstblank that will be the 1st empty cell in rngFound but this will only work if it is TRULY empty, not just blank with a formula in it. this is untested but should get you started.......... hth susan On Mar 20, 8:14 am, "Coza" wrote: Private Sub CommandButton1_Click() Application.ScreenUpdating = False Dim rngFound As Range On Error Resume Next With Worksheets("Data").Range("A:A") Set rngFound = .Find(What:=Me.TextBox1.Value, After:=.Cells(1), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, Matchbyte:=False) ' HOW CAN I FIND THE 1ST EMPTY ("") CELL IN THE rngfound.offset(0,x) ROW ? ' I want to place some Textbox values into the First Blank Cell in the Same Row as the (RNGFOUND) but do not know how to Add this in. ' Say for instance: 1st Blank Cell in Row: textbxo1.value = rngfound(0,ISEMPTY).value ' Other code here Application.ScreenUpdating = True End Sub Corey.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hpw do I delete multiple empty rows found between filled rows? | Excel Worksheet Functions | |||
VBA HELP - DO UNTIL EMPTY ROW FOUND | Excel Discussion (Misc queries) | |||
Leaving an empty cell empty | Excel Discussion (Misc queries) | |||
why a reference to an empty cell is not considered empty | Excel Discussion (Misc queries) | |||
Finding next empty empty cell in a range of columns | Excel Programming |