View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Moce cells with some programming

Hi,

Put this in the cells you want to populate with OTY

=IF(A1=B1,"OTY","")

Mike

"sunrisa" wrote:

Hi and thank you for this

This is exactly how I want it to be, but one thing how do I set this up in
the workbook (how will the code look like) I have never used VBA so I´m
hoping that I can do this without it

Regards, Sunrisa

"Mike H" wrote:

Hi,

This is very vague but this may get you moving in the correct direction.

If a1 = b1 Then ' your 2 dates
Cells(10, 10) = "OTY"
Cells(10, 10).Offset(, 5) = "OTY"
Cells(10, 10).Offset(, -5) = "OTY"
End If

Mike

"sunrisa" wrote:

Hi

If date = another date then cell1 = OTY and X cells to the left = OTY and y
cell to the right = OTY.

How do I do this in excel???

Thanx sunrisa