dpaton05
Well-known Member
- Joined
- Aug 14, 2018
- Messages
- 2,352
- Office Version
- 365
- 2016
- Platform
- Windows
I have got a spreadsheet that has an autofilter that filters jobs based on date and request number. If there are more than 1 result, I want the spreadsheet to zoom in and highlight the first result/row and ask if this is the job that needs to have the Late Cancel pricing, applied to it, if No is pressed, move on to the next job that matches the criteria. There will only be one job that matches the criteria and if no is pressed for each job, display a message box 'no jobs have been cancelled'.
My procedure works when there is just one match, but if there are multiple, I want it to ask for each one.
I do not know how to code very well and this is what I have managed to scrounge around from various places.
My procedure works when there is just one match, but if there are multiple, I want it to ask for each one.
I do not know how to code very well and this is what I have managed to scrounge around from various places.
VBA Code:
Dim rws&: rws = Range("A4:A" & Cells(Rows.Count, 1).End(3).Row).SpecialCells(xlCellTypeVisible).Count
If rws > 1 Then
'If ws.Range("A4", ws.Range("A4").End(xlDown)) > 1 Then
Dim answer As Integer
For Each x In rng
answer = MsgBox("Is this the job you want to apply the late cancel price too?", vbQuestion + vbYesNo + vbDefaultButton2, "Late Cancel Price")
Next x
'End If