Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default pasting same data over many cells containing a formula

Hi, I am trying to insert data into cells that already have data in them.
Is there a way to get excel to do this simply? I know I can add a row of
formulas and get it done but I am told there is an easier way and I don't
see it.

Thanks!

Todd

ex. become
51986 w256 51986
51987 w256 51987
51988 w256 51988


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default pasting same data over many cells containing a formula

Iif you don't want to use a formula like ="w256 " & A1 copied down the column.

You could try a macro.

Sub Add_Text()
Dim cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo endit
whichside = InputBox("Left = 1 or Right =2")
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
moretext = InputBox("Enter your Text")
If whichside = 1 Then
For Each cell In thisrng
cell.Value = moretext & cell.Value
Next
Else
For Each cell In thisrng
cell.Value = cell.Value & moretext
Next
End If
Exit Sub
endit:
MsgBox "only formulas in range"
End Sub

If you're not familiar with VBA and macros, see David McRitchie's site for
more on "getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or Ron de De Bruin's site on where to store macros.

http://www.rondebruin.nl/code.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run or edit the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP

On Fri, 4 Apr 2008 14:14:54 -0700, "Todd" wrote:

Hi, I am trying to insert data into cells that already have data in them.
Is there a way to get excel to do this simply? I know I can add a row of
formulas and get it done but I am told there is an easier way and I don't
see it.

Thanks!

Todd

ex. become
51986 w256 51986
51987 w256 51987
51988 w256 51988


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default pasting same data over many cells containing a formula

Thanks,

Those are good ways, however, it is supposed to be much easier, like a pre
built excel function that does it. It isn't anything I know of, but I have
a friend who can't remember how, but saw it in a excel course.


Todd



"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Iif you don't want to use a formula like ="w256 " & A1 copied down the
column.

You could try a macro.

Sub Add_Text()
Dim cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo endit
whichside = InputBox("Left = 1 or Right =2")
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
moretext = InputBox("Enter your Text")
If whichside = 1 Then
For Each cell In thisrng
cell.Value = moretext & cell.Value
Next
Else
For Each cell In thisrng
cell.Value = cell.Value & moretext
Next
End If
Exit Sub
endit:
MsgBox "only formulas in range"
End Sub

If you're not familiar with VBA and macros, see David McRitchie's site for
more on "getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or Ron de De Bruin's site on where to store macros.

http://www.rondebruin.nl/code.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run or edit the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP

On Fri, 4 Apr 2008 14:14:54 -0700, "Todd" wrote:

Hi, I am trying to insert data into cells that already have data in them.
Is there a way to get excel to do this simply? I know I can add a row of
formulas and get it done but I am told there is an easier way and I don't
see it.

Thanks!

Todd

ex. become
51986 w256 51986
51987 w256 51987
51988 w256 51988



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default pasting same data over many cells containing a formula

Excel has never had such a function so it is not easier as you have been told.

Without helper cells and formulas or a macro there is no way to append or
prepend text to existing text or values.

Your friend may have seen a macro in action.

Or the the course instructor may be a moonlighting prestidigitator


Gord

On Fri, 4 Apr 2008 14:37:46 -0700, "Todd" wrote:

Thanks,

Those are good ways, however, it is supposed to be much easier, like a pre
built excel function that does it. It isn't anything I know of, but I have
a friend who can't remember how, but saw it in a excel course.


Todd



"Gord Dibben" <gorddibbATshawDOTca wrote in message
.. .
Iif you don't want to use a formula like ="w256 " & A1 copied down the
column.

You could try a macro.

Sub Add_Text()
Dim cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo endit
whichside = InputBox("Left = 1 or Right =2")
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
moretext = InputBox("Enter your Text")
If whichside = 1 Then
For Each cell In thisrng
cell.Value = moretext & cell.Value
Next
Else
For Each cell In thisrng
cell.Value = cell.Value & moretext
Next
End If
Exit Sub
endit:
MsgBox "only formulas in range"
End Sub

If you're not familiar with VBA and macros, see David McRitchie's site for
more on "getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or Ron de De Bruin's site on where to store macros.

http://www.rondebruin.nl/code.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run or edit the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP

On Fri, 4 Apr 2008 14:14:54 -0700, "Todd" wrote:

Hi, I am trying to insert data into cells that already have data in them.
Is there a way to get excel to do this simply? I know I can add a row of
formulas and get it done but I am told there is an easier way and I don't
see it.

Thanks!

Todd

ex. become
51986 w256 51986
51987 w256 51987
51988 w256 51988



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 903
Default pasting same data over many cells containing a formula

You mean like an addin, you can package a macro as an addin.
There are many different ways of running a macro.

--
HTH,
David McRitchie, Microsoft MVP -- Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm


"Todd" wrote in message ...
Thanks,

Those are good ways, however, it is supposed to be much easier, like a pre
built excel function that does it. It isn't anything I know of, but I have
a friend who can't remember how, but saw it in a excel course.


Todd



"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Iif you don't want to use a formula like ="w256 " & A1 copied down the
column.

You could try a macro.

Sub Add_Text()
Dim cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo endit
whichside = InputBox("Left = 1 or Right =2")
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
moretext = InputBox("Enter your Text")
If whichside = 1 Then
For Each cell In thisrng
cell.Value = moretext & cell.Value
Next
Else
For Each cell In thisrng
cell.Value = cell.Value & moretext
Next
End If
Exit Sub
endit:
MsgBox "only formulas in range"
End Sub

If you're not familiar with VBA and macros, see David McRitchie's site for
more on "getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or Ron de De Bruin's site on where to store macros.

http://www.rondebruin.nl/code.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run or edit the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP

On Fri, 4 Apr 2008 14:14:54 -0700, "Todd" wrote:

Hi, I am trying to insert data into cells that already have data in them.
Is there a way to get excel to do this simply? I know I can add a row of
formulas and get it done but I am told there is an easier way and I don't
see it.

Thanks!

Todd

ex. become
51986 w256 51986
51987 w256 51987
51988 w256 51988





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop users pasting data in cells trainerab Excel Discussion (Misc queries) 2 February 5th 08 05:37 PM
Protecting Validated cells from pasting over data Pendelfin Excel Discussion (Misc queries) 0 November 15th 06 02:41 PM
pasting data on hidden cells create_share Excel Discussion (Misc queries) 2 February 1st 06 06:50 AM
Pasting on Filtered Data Sheets without pasting onto hidden cells CCSMCA Excel Discussion (Misc queries) 1 August 28th 05 01:22 PM
pasting data over hidden cells KyWilde Excel Worksheet Functions 3 May 23rd 05 01:35 PM


All times are GMT +1. The time now is 04:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"