Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to build a macro that will look for any value in each cell in
column Z and then to put a Yes in cell AA. This needs to work for all cells in column Z were there is any data in the cell in column A. He |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sub UpdateAA()
Dim r as Range, r1 as Range, c as Range On error Resume Next set r = columns("Z").specialCells(xlConstants) set r1 = columns("Z").SpecialCells(xlFormulas) On Error goto 0 if not r is nothing then for each c in r c.offset(0,1).Value = "Yes" Next end if if not r1 is nothing then for each c in r1 c.offset(0,1).Value = "Yes" Next end if end Sub -- regards, Tom Ogilvy "Paul Dennis" wrote: I'm trying to build a macro that will look for any value in each cell in column Z and then to put a Yes in cell AA. This needs to work for all cells in column Z were there is any data in the cell in column A. He |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Will a worksheet function do?
=IF(z1<"",IF(A1<"","Yes",""),"") Keith |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One possible way:
For Each cell In Range("Z1:Z100") If cell.Value = "Value" _ Then cell.Offset(0, 1).Value = "Yes" Else End If Next cell Adjust your range and "Value" as necessary. If you want your "Value" to be a cell, then: If cell.Value = Range("A1").value Hope this helps, Paul -- "Paul Dennis" wrote in message ... I'm trying to build a macro that will look for any value in each cell in column Z and then to put a Yes in cell AA. This needs to work for all cells in column Z were there is any data in the cell in column A. He |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to look down cells and if negative in the right of the cell change to left of the cell | Excel Programming | |||
How do I get the content of the cell left of the active cell? | Excel Programming | |||
Run Macro after cell content changes... | Excel Programming | |||
Macro on cell content | New Users to Excel | |||
Please help! Macro to change cell contents based on cell to the left | Excel Programming |