ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Shift cells right (https://www.excelbanter.com/excel-discussion-misc-queries/345573-shift-cells-right.html)

gary

Shift cells right
 
Is there a way to move cells whose contents begin with '0A' from Col B
to Col C?

Don Guillett[_2_]

Shift cells right
 
On Jan 24, 12:36*pm, gary wrote:
Is there a way to move cells whose contents begin with '0A' from Col B
to Col C?


option explicit
sub moveem()
dim c as range
for each c in range("a2:a22")
if ucase(left(c,2))="0A" then
c.offset(,1)=c
c=""
end if
next c
end sub


All times are GMT +1. The time now is 10:08 AM.

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