Flux rss
Search : in
By : Relevance Date Username
Statut : Not resolved

Macro Help In Excel COPY PASTING

theloniousmonk, on Wednesday 24 September 2008 à 21:57:36
Hello,

I am trying to copy data from a excell spread sheet that is actually a set template i.e.

Name:John Doe Age:17

Job: Painter Favorite Food: Pizza

I think it would be easy to copy the fields since they are stationary and move to a different book or atleast copy onto clipboard then be able to paste like


First Name JOB FOOD Age Less Than Me
------------------------------------------------------------­--------
John Doe Painter Pizza 6
Configuration: Windows 2003
Internet Explorer 7.0
Reply to theloniousmonk  Report this message to moderators Go to last message

1


  • This message seems useful, vote!
  • Report this message to moderators
 DAOQ, on Friday 26 September 2008 à 18:51:45
Will This Help ? (below...)

'Macro to copy the text in several cells on several worksheets to the clipboard for pasting.
Public Sub CopyIt()

'I assume you will loop through several worksheets in a workbook so I created a sheet object.
Dim Sheet As Excel.Worksheet

'I made a variable to hold the text from the cells.
Dim Txt As String

'I created a data object to use with the clipboard.
'You must have 'Microsoft Forms 2.0 Object Library' checked in "Tools" - "References"
'in order to use the 'DataObject' type.
Dim MyData As New DataObject

'Clear the text.
Txt = ""

'Loop through each of the sheets in the workbook...
'If you only want one worksheet then you don't need the loop or the sheet variable,
' instead you can use 'ActiveSheet' or name the sheet directly.
For Each Sheet In ActiveWorkbook.Sheets

'Add each cell in the sheet to the text variable using the cells function.
'I just put numbers in this one the numbers you have will depend on where the data is
'in your form. ( the vbtab tells it to move over by one column before the next data is added. )
Txt = Txt & Sheet.Cells(4, 5) & vbTab
Txt = Txt & Sheet.Cells(6, 5) & vbTab
Txt = Txt & Sheet.Cells(8, 5) & vbTab
Txt = Txt & Sheet.Cells(4, 7) & vbTab
Txt = Txt & Sheet.Cells(6, 7) & vbTab
Txt = Txt & Sheet.Cells(8, 7) & vbTab 'You could put the vbCrLf below here instead of vbTab.

'This tells it to add a return and line feed so the data from the next sheet
'will go to the next line instead of one big long line.
Txt = Txt & vbCrLf

'Finish the loop.
Next Sheet

'This uses the Data Object to put the collected text on the clipboard.
MyData.SetText Txt
MyData.PutInClipboard

'You are now ready to paste !

End Sub
Reply to DAOQ

Résultats pour Macro Help In Excel COPY PASTING

Copy/Paste problems when using Firefox Copy/Paste problems when using Firefox Adware Pushow Extensions It happens that sometimes, Firefox refuse to copy/paste items. Two assumptions can be made: Adware Pushow You have been infected by an adware, named pushow**.dll... en.kioskea.net/faq/sujet-496-copy-paste-problems-when-using-firefox
Copy/paste a shortcut file to desktop Hello, how can i copy/paste a shortcut file to the desktop. example. i have a shortcut file in c:\document and settings\. the shortcut is like from a game. i want to take it from document and settings to the desktop with a BATCH file (*.BAT). ty for... en.kioskea.net/forum/affich-21506-copy-paste-a-shortcut-file-to-desktop
Copy rows based on a condition Hi How can I have excel copy the entire row of data from worksheet Employee Inventory to another worksheet called EEs if column Q contains TERM. I've tried almost everything but nothing is working. Please help! en.kioskea.net/forum/affich-30153-copy-rows-based-on-a-condition

Résultats pour Macro Help In Excel COPY PASTING

Formatting articles of the knowledge baseFormatting articles of the knowledge base /!\Be careful /!\ : Don't do a copy/paste of a tip found on another website : First of all, it's unuseful since the same tip is twice on internet. Moreover it's possible that there's a copyright on... en.kioskea.net/faq/sujet-63-formatting-articles-of-the-knowledge-base
To insert an image in the FAQTo insert an image in the FAQ Method Where to find images? Inserting screenshots can help to understand an explanation. Here is how to improve tips on Kioskea (FAQ). For this trick, we opted to use the site Imageshack.us. Note:... en.kioskea.net/faq/sujet-67-to-insert-an-image-in-the-faq

Résultats pour Macro Help In Excel COPY PASTING

Macro helpHi I am wondering if somone could help me with some macros in excell 2003. They should be pretty basic, so any help would be great. I have a colum with 3 letter codes that may be repeated throughout the column. I was wanting a macro to copy this... en.kioskea.net/forum/affich-23512-macro-help
Need help in copying dataHello, can anyone help me in copying data (dont know the usedrange) from an excel and paste it in the activesheet Thanks in advance en.kioskea.net/forum/affich-29137-need-help-in-copying-data
Copying simple macro down a listHello, Have created asimple macro (literally minus one cell from another) Now every week this list gets longer and longer, and I need the macro to copy the formula to the end of the list, any ideas. At the moment it just runs it till the cell I copied... en.kioskea.net/forum/affich-33036-copying-simple-macro-down-a-list

Résultats pour Macro Help In Excel COPY PASTING

Download FirefoxMozilla Firefox is a secure web-browser frequently updated and with Hundreds extension, themes, etc. Easily installed, it also lets you easily import your bookmarks from your old browser. Take advantage of features such as tabbed browsing,... en.kioskea.net/telecharger/telecharger-32-firefox

Résultats pour Macro Help In Excel COPY PASTING

Spreadsheets - The Excel Interface Microsoft Excel is the spreadsheet in the Microsoft Office office suite. To start it, simply click on the appropriate icon in the Start menu (in Windows) or click on an Excel file (that has an .xls file extension). A Excel document is called a file... en.kioskea.net/tableur/tabinterface.php3
Spreadsheets - Cell Selection Spreadsheets are powerful tools for working with data. However, to work with data, it is necessary to have tools to rapidly choose the required cells. An entire line can be chosen by clicking directly on the line header: It is also possible to choose... en.kioskea.net/tableur/tabcellselect-1.php3
Viruses - Blaster / LovSan Appearing in the summer of 2003, LovSan (also known as W32/Lovsan.worm, W32/Lovsan.worm.b, W32.Blaster.Worm, W32/Blaster-B, WORM_MSBLAST.A, MSBLASTER, Win32.Poza, Win32.Posa.Worm, and Win32.Poza.B) is the first virus to exploit the security hole in... en.kioskea.net/virus/lovsan-blaster.php3