ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Moce cells with some programming (https://www.excelbanter.com/excel-programming/419283-moce-cells-some-programming.html)

sunrisa

Moce cells with some programming
 
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

Mike H

Moce cells with some programming
 
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


sunrisa

Moce cells with some programming
 
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


Mike H

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


sunrisa

Moce cells with some programming
 
Ok thanx again

But if I do it like that I need to something like this
IF(A1=B1,"OTY" & o13="OTY" & p13="OTY" ..... ,"")
But this dosen´t works :(

Sunrisa

"Mike H" wrote:

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



All times are GMT +1. The time now is 11:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com