hi
I have a form button that I need the cursor to jump to the next blank in the column BP9:BP, where the first data row starts from BP9, and user inputs data non-contiguously in column BP9:BP (column 68). The mandatorily contiguous input range "Date" column D determines last working row. The find criteria is to jump to the NEXT BLANK in BP9:BP which ALSO is accompanied with a FILLED NUMERIC VALUE in its adjacent column BO (on same row with BP). For example, some BP9:BP may be blank but its adjacent BO could be filled with a TEXT value, or BO could be just empty, (these types of blank BP9:BP should just be skipped and not to be bothered with by the macro). BO9:BO is auto-calculated by formula, currently has formulae (that isn't dependent on BP), down to row 10,000, & on workbook open auto-calculation if D is filled, it returns a value that may be TEXT or NUMERIC, or returns a blank.
The find criteria is only above, go for the next BP blank starting from BP9, stop at the next BP that is blank, that has an adjacent BO that is filled & BO is a NUMERIC value.
I have an existing code that does a simpler criteria by finding for the next blank in AW9:AW as follows but I didn't have the capability to adapt this code (i think it's the blue bit) to fit the above criteria. If anyone can show me how the modification should be done, I would appreciate it.
Sub RECONOPEN_Rick()
Dim LastRow As Long, PrevCell As Range
Set PrevCell = ActiveCell
LastRow = Cells(Rows.Count, "D").End(xlUp).Row
'AW8 has a formula that derives from the ranges DNR_Register_rec_ctr_opn RECON_chkr_OPEN that counts the no.of blanks in AW9:AW
Range("DNR_Register_rec_ctr_opn").Calculate
Range("RECON_chkr_OPEN,AW8").Calculate
If Range("AW8").Value = 0 Then
MsgBox " No unrecon OPEN", vbOKOnly, " Browse for Unrecon"
Exit Sub
Else
If ActiveCell.Column <> 49 Then
Range("AW9:AW" & LastRow).Find("", Cells(LastRow, "AW"), xlValues, xlWhole, , xlNext, , , False).Select
If ActiveCell.Row >= LastRow Then
PrevCell.Select
MsgBox " No unrecon OPEN", vbOKOnly, " Browse for Unrecon"
End If
Else
Range(ActiveCell, Cells(LastRow, "AW")).Find("", ActiveCell, xlValues, xlWhole, , xlNext, , , False).Select
If ActiveCell.Row >= LastRow Then
PrevCell.Select
MsgBox " No more unrecon OPEN", vbOKOnly, " Browse for Unrecon"
End If
End If
End If
End Sub
cheers
Stewart
Bookmarks