not save if there is no data in column C6, D6, E6, F6, G6, H6, J6, K6, M6, O6, but can save if there is no data in B6, I6, L6, N6, P6, Q6
So to paraphrase the requirements ...
If C6 is blank and D6 is blank and ..... O6 is blank then
Display message
If B6 is blank and I6 is blank and .... Q6 is blank then
save the data
So all 10 of the first group must be blank to get the message
Or all 6 of the second group must be blank to save
Correct?
What if there's data in C6 and in Q6? Then no message and no save?
You only want to copy Row 6, or multiple rows?
Option Explicit
'not save if there is no data in column C6, D6, E6, F6, G6, H6, J6, K6, M6, O6, but can save if there is no data in B6, I6, L6, N6, P6, Q6
Sub CodeFragment()
Dim iSumOfShowMessageCells As Long
Dim iSumOfSaveDataCells As Long
Dim i As Long
For i = 2 To 17
Select Case i
Case 3, 4, 5, 6, 7, 8, 10, 11, 13, 15
If Len(Cells(6, i).Value) = 0 Then iSumOfShowMessageCells = iSumOfShowMessageCells + 1
Case 2, 9, 12, 14, 16, 17
If Len(Cells(6, i).Value) = 0 Then iSumOfSaveDataCells = iSumOfSaveDataCells + 1
End Select
Next i
If iSumOfShowMessageCells <> 10 Then
MsgBox "First group not all blank"
End If
If iSumOfSaveDataCells = 6 Then
MsgBox "Save the data"
End If
End Sub
Not the most efficient way to do it
Paul