Glanza270bhp
New Member
- Joined
- Oct 16, 2020
- Messages
- 6
- Office Version
- 2016
- Platform
- Windows
Hi All,
Another (very) newbie here!
I have a database where I want VBA to search all data in column j for a value and then column h and if both values are found in the same row, then return the words "high priority" in column k.
I have tried the below however I am getting 'type mismatch' error. Can anyone help please?
Many thanks in advance,
Rachel
StartRow = 1
LASTROW = Cells.Find("*", Cells(1), xlFormulas, xlWhole, xlByRows, xlPrevious).Row
For Row = StartRow To LASTROW Step 1
If Cells(Row, 10) = 30 And Cells(Row, 8) = 20 Then
Cells(Row, 11).Value = "HIGH PRIORITY"
End If
Next Row
Another (very) newbie here!
I have a database where I want VBA to search all data in column j for a value and then column h and if both values are found in the same row, then return the words "high priority" in column k.
I have tried the below however I am getting 'type mismatch' error. Can anyone help please?
Many thanks in advance,
Rachel
StartRow = 1
LASTROW = Cells.Find("*", Cells(1), xlFormulas, xlWhole, xlByRows, xlPrevious).Row
For Row = StartRow To LASTROW Step 1
If Cells(Row, 10) = 30 And Cells(Row, 8) = 20 Then
Cells(Row, 11).Value = "HIGH PRIORITY"
End If
Next Row