Copy a cell into notepad adds quotes

fella5

New Member
Joined
Mar 23, 2010
Messages
24
I have been trying to use excel to generate commands so that I can paste then into a Cisco switch. I want to enter a command and the have a carriage return and then enter "Y" and then another carriage return. The command needs to be entered (carriage return) and then the WLC ask to reboot the device (y/n) and I want to enter y then carriage return. I've tried using the CHAR(13),CHAR(10) and trying to use a replace or substitute. And I can't figure it out.

My cell formula i'm using is:
=CONCATENATE("config ap static-IP disable ",A1&CHAR(10)&"y"&CHAR(10)&CHAR(10))

What I want is to generate the following:
config ap static-IP disable AP-NAME
y

But when I past this into notepad, I get:
"config ap static-IP disable AP-NAME
y

"

Thanks!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
try setting a string variable to = "config ap static-IP disable "
then call the variable in the formula?

if this is something that can be done via DOS commands I would do that instead of notepads etc
 
Upvote 0
try setting a string variable to = "config ap static-IP disable "
then call the variable in the formula?

if this is something that can be done via DOS commands I would do that instead of notepads etc

This is what I did and still has the " "

A1: = "config ap static-IP disable "
B1: ="y"
B1: =A1
B2: =A2
C1: =CONCATENATE(B1,CHAR(10),B2)

Output on notepad is: "config ap static-IP disable
y"
 
Upvote 0
As far as I know, the opening and closing quotation marks will always be added while copying cells with line breaks in them.
 
Upvote 0
A1: config ap static-IP disable
A2: y
Select A1:A2, copy the selection, paste it into notepad
 
Last edited:
Upvote 0
A1: config ap static-IP disable
A2: y
Select A1:A2, copy the selection, paste it into notepad

Yeah... I've don't that. My problem is I have a sheet with columns of commands and the first cell in each row is the device name. So adding another row below the command will not work. It's okay I guess... They just have to paste into notepad and delete the ".

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,612
Messages
6,179,890
Members
452,948
Latest member
Dupuhini

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