right now this code exports to another sheet, and only exports the active cell. I want to export to a new spreadsheet with a new name, and a given area instead of just the active cell.
Sub ClickAdd()
Dim rngAvailable As Range, rngCell As Range, bolSuccess As Boolean
Set rngAvailable = ThisWorkbook.Worksheets("Sheet1").Range("B18:B40") 'Range Of Cells'
For Each rngCell In rngAvailable
If rngCell.Value = vbNullString Then
rngCell.Value = ActiveCell.Value
bolSuccess = True
Exit For
End If
Next
If Not bolSuccess Then
MsgBox "Ran outta spaces...", 0, ""
End If
End Sub
Is it possible to have the new spreadsheet name preset in the code? the space i am looking to export is A4:C34, F4:F34, I4:Q34. I would also like to know if only the data that gets exported, gets exported if a "y" vs "n" is in place in fields F4:F34?
Bookmarks