Changing Name in range

sharafoly

New Member
Joined
Oct 2, 2010
Messages
7
Hi..
I currently have a VB code that only misses something vital for me, i want to change the name in a cell and copy the new name in a new cell while leaving the old one as it is.

Here is and Example:

Cell F6="10-746"
I want cell E5 to be="746-10"
and cell F6 to be kept as it is.

N.B
i will add it to the end of a sub so i just want to copy and past plssss
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hello and welcome

Try.

<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> test()<br>x = Split(Range("F6"), "-")<br>Range("E5") = x(1) & "-" & x(0)<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
 
Upvote 0
Thank youu.. it works just fine i have another question plss..

Simply my code is used to make invoices by copying certain cells from a table and pasting it to the invoice the vb code goes as follows...

i run the macro and at the end of it it is ordered to run another macro to change the name in the range then another macro runs to save as the new name then another macro runs to open the new empty invoice again then i must rerun the macro all over again.. iam trying to make a loop so it goes doing this untill cell b2 is empty
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,605
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top