ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Is there a macro i can use to copy a cell +1 (https://www.excelbanter.com/excel-discussion-misc-queries/176146-there-macro-i-can-use-copy-cell-1-a.html)

Bill M.

Is there a macro i can use to copy a cell +1
 
I am wondering if there is a VBA code to copy a whole cell into another whole
cell and add 1 more number to it. E.G. one cell E19 is 9N08, and i was trying
to put 9N09 into cell F19, E21 is 9S18, and i was trying to copy 9S19 into
F21 etc. for the whole worksheet.

Dave Peterson

Is there a macro i can use to copy a cell +1
 
Maybe...

=LEFT(F19,2)&TEXT(RIGHT(F19,2)+1,"00")



Bill M. wrote:

I am wondering if there is a VBA code to copy a whole cell into another whole
cell and add 1 more number to it. E.G. one cell E19 is 9N08, and i was trying
to put 9N09 into cell F19, E21 is 9S18, and i was trying to copy 9S19 into
F21 etc. for the whole worksheet.


--

Dave Peterson

MartinW

Is there a macro i can use to copy a cell +1
 
Hi Bill,

The fill handle will do that for you,

With 9N08 in E19
Grab the fill handle and drag it across as far as you like.

The fill handle is the little black box at the bottom right
of the active cell. When you hover your cursor over
that box it will change to a small cross, just left click and drag.

If you can't see the fill handle you may need to go to
ToolsOptionsEdit Tab and Check 'Allow cell drag and drop'

HTH
Martin

"Bill M." <Bill wrote in message
...
I am wondering if there is a VBA code to copy a whole cell into another
whole
cell and add 1 more number to it. E.G. one cell E19 is 9N08, and i was
trying
to put 9N09 into cell F19, E21 is 9S18, and i was trying to copy 9S19 into
F21 etc. for the whole worksheet.




Bill M.[_2_]

Is there a macro i can use to copy a cell +1
 
Another thing I was wondering is if i could change the letters in the cells
from s, n, etc. to an A? after being copied?

"Bill M." wrote:

I am wondering if there is a VBA code to copy a whole cell into another whole
cell and add 1 more number to it. E.G. one cell E19 is 9N08, and i was trying
to put 9N09 into cell F19, E21 is 9S18, and i was trying to copy 9S19 into
F21 etc. for the whole worksheet.


Dave Peterson

Is there a macro i can use to copy a cell +1
 
=LEFT(F19,1)&"A"&TEXT(RIGHT(F19,2)+1,"00")

If you really want a macro, you'd have to specify what that "etc" means. Or if
the formula works, you could use the formula to populate the range and then just
convert to values.

Bill M. wrote:

Another thing I was wondering is if i could change the letters in the cells
from s, n, etc. to an A? after being copied?

"Bill M." wrote:

I am wondering if there is a VBA code to copy a whole cell into another whole
cell and add 1 more number to it. E.G. one cell E19 is 9N08, and i was trying
to put 9N09 into cell F19, E21 is 9S18, and i was trying to copy 9S19 into
F21 etc. for the whole worksheet.


--

Dave Peterson


All times are GMT +1. The time now is 08:35 PM.

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