Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
' This checks "AA" ="" (Empty) and "AB"<"" Not Empty
' when you click on a cell in the AA column Public Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Column = 27 Then If Cells(Target.row, "AA").Value = "" And Cells(Target.row, "AB") < "" Then Cells(Target.row, "AA") = Cells(Target.row, "B") MsgBox Str(Target.row) & ":" & Str(Target.Column) & " Nil" End If End If End Sub ' Hope this helps Mercedes ' Andrew "mercedes" wrote in message ... | | Hello! | I need some help with a macro code. I'm a beginner who doesn't know | quite how to do begin. I have records in rows in an Excel spread sheet, | I need code that would check each record to see if data is present in | column AB cell. If AB is NOT blank, I need it to check if column AA | cell is blank. If it is blank, I need it to copy the data from column B | cell to column AA cell...again only if column AB is not blank and AA is | blank. Whew! Hope that made sense. Thanks in advance for all your help. | | | -- | mercedes | ------------------------------------------------------------------------ | mercedes's Profile: http://www.excelforum.com/member.php...o&userid=24979 | View this thread: http://www.excelforum.com/showthread...hreadid=473634 | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Check Box - Macro code | Excel Discussion (Misc queries) | |||
Use macro to check a range of cells within a row and copy wanted data to new sheet | Excel Programming | |||
Use macro to check a range of cells within a row and copy wanted data to new sheet | Excel Programming | |||
Use macro to check a range of cells within a row and copy wanted data to new sheet | Excel Programming | |||
check for selected columns in a macro | Excel Programming |