Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I need to check that all data in a row is filled in. For example, if there is an entry in D1, there must be entries in A1, B1, and C1. It will be up to the user to fill in the required data for A1, B1, and C1. I plan to run this as a macro that will check that all data is entered, and display a message back to the user that they need to update some cells. .......thanks in advance.......Herb |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about
Sub checkdata() For Each c In Range("a11:a14") If c = "" Then c.Value = InputBox("Fill in " & c.Address) Next End Sub -- Don Guillett SalesAid Software "Herb" wrote in message ... Hi I need to check that all data in a row is filled in. For example, if there is an entry in D1, there must be entries in A1, B1, and C1. It will be up to the user to fill in the required data for A1, B1, and C1. I plan to run this as a macro that will check that all data is entered, and display a message back to the user that they need to update some cells. ......thanks in advance.......Herb |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Sub TestData() Dim i As Long Dim continueWork As Boolean continueWork = True For i = 1 To 3 If IsEmpty(Worksheets(1).Cells(1, i)) Then MsgBox "You need to fill cell: " & Worksheets (1).Cells(1, i).Address continueWork = False End If Next i If Not continueWork Then Exit Sub 'some other instructions if continueWork is set to True End Sub -----Original Message----- Hi I need to check that all data in a row is filled in. For example, if there is an entry in D1, there must be entries in A1, B1, and C1. It will be up to the user to fill in the required data for A1, B1, and C1. I plan to run this as a macro that will check that all data is entered, and display a message back to the user that they need to update some cells. .......thanks in advance.......Herb . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Herb" wrote in message ...
Hi I need to check that all data in a row is filled in. For example, if there is an entry in D1, there must be entries in A1, B1, and C1. It will be up to the user to fill in the required data for A1, B1, and C1. I plan to run this as a macro that will check that all data is entered, and display a message back to the user that they need to update some cells. ......thanks in advance.......Herb Hi herb... Tom Olgivy wrote this code for me... it checks that the cells have data in them and if not.. a msg pops up and says which cell is empty ....it runs through several sheets but l hope it will be a start for you... hope this helps seeya ste public Sub tomo1() Dim sh As Worksheet, rng As Range, rng1 As Range For Each sh In ThisWorkbook.Worksheets If Left(sh.Name, 1) = "S" And IsNumeric(Right(sh.Name, Len(sh.Name) - 1)) Then Set rng = sh.Range(sh.Cells(1, 1), _ sh.Cells(Rows.Count, "AS").End(xlUp)) On Error Resume Next Set rng1 = rng.SpecialCells(xlBlanks) On Error GoTo 0 If Not rng1 Is Nothing Then MsgBox " There is data loss in sheet " & sh.Name & " The location is: " & rng1.Cells.Address, vbCritical, " System information data loss found:" Exit Sub End If End If Next MsgBox "The System is Healthy", vbInformation, " Full System check completed" End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need to do a data check - not sure the best way. | Excel Worksheet Functions | |||
How can I check/verify data in my Data Source for Pivot table? | Excel Worksheet Functions | |||
Row data duplicate check. | Excel Discussion (Misc queries) | |||
How can I check if data in an external data range is changed afte. | Excel Worksheet Functions | |||
How can I check if data in external data range is changed after re | Excel Discussion (Misc queries) |