ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Move cursor to columns to the right (https://www.excelbanter.com/excel-programming/272989-re-move-cursor-columns-right.html)

Don Guillett[_4_]

Move cursor to columns to the right
 
this will work
Sub FindDivide()
x = Columns(3).find("LU").Address
Range([x]).Offset(, 2) = Range([x]).Offset(, 2) / 1000
End Sub

--
Don Guillett
SalesAid Software
Granite Shoals, TX

"Steven R. Berke" wrote in message
om...
I want to write a macor which will find the letters LU in Column C
them move to rows to the right to column E and divide the figure in
column E by 1000.




Tom Ogilvy

Move cursor to columns to the right
 
you don't need to evaluate a string to make it a string
Range([x]).Offset(, 2) = Range([x]).Offset(, 2) / 1000

can be simplified to

Range(x).Offset(, 2) = Range(x).Offset(, 2) / 1000

Either method will raise an error if LU is not found.

Regards,
Tom Ogilvy


Don Guillett wrote in message
...
this will work
Sub FindDivide()
x = Columns(3).find("LU").Address
Range([x]).Offset(, 2) = Range([x]).Offset(, 2) / 1000
End Sub

--
Don Guillett
SalesAid Software
Granite Shoals, TX

"Steven R. Berke" wrote in message
om...
I want to write a macor which will find the letters LU in Column C
them move to rows to the right to column E and divide the figure in
column E by 1000.







All times are GMT +1. The time now is 10:57 PM.

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