#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Import to excel

I often have to import data into excel. This in itself is not the problem.
My source document does not provide the date and name on each line. These
items only appear on the first line. I need them on every line to sort
properly. The file is very large so cut and paste is out of the question.
So is dragging.

Than you,
Bill Chance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Import to excel

Select the cells you want to process and run the following macro. It will
take the date and name from the first cell and place it in front of the
others:

Sub fixup()
k = 0
For Each cell In Selection
If k = 0 Then
v = cell.Value
k = 1
Else
cell.Value = v & cell.Value
End If
Next
End Sub

For example, if the input data looks like:

9/15/2008 James
Larry
Moe
Curley


the macro will produce:

9/15/2008 James
9/15/2008 JamesLarry
9/15/2008 JamesMoe
9/15/2008 JamesCurley


--
Gary''s Student - gsnu200804


"LtWmChance" wrote:

I often have to import data into excel. This in itself is not the problem.
My source document does not provide the date and name on each line. These
items only appear on the first line. I need them on every line to sort
properly. The file is very large so cut and paste is out of the question.
So is dragging.

Than you,
Bill Chance

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Import to excel

Hard to tell with the lack of deatil but maybe.............?

Select the column(s) with the missing data then F5SpecialBlanksOK

In the active cell enter an = sign then point or arrow to cell above then
CTRL + ENTER.

EditCopy

EditPaste SpecialValuesOKEsc


Gord Dibben MS Excel MVP

On Mon, 15 Sep 2008 04:08:01 -0700, LtWmChance
wrote:

I often have to import data into excel. This in itself is not the problem.
My source document does not provide the date and name on each line. These
items only appear on the first line. I need them on every line to sort
properly. The file is very large so cut and paste is out of the question.
So is dragging.

Than you,
Bill Chance


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
How to Start Excel in Text Import Wizard for data import rlelvis Setting up and Configuration of Excel 0 July 10th 08 08:40 PM
Data Import to Excel Issue with Excel 2007 and Excel 2003 on same Melsh Excel Discussion (Misc queries) 0 August 1st 07 09:32 PM
Please help with Excel import Sharon A Excel Discussion (Misc queries) 3 August 31st 06 04:08 AM
import .wmf-excel 03? [email protected] Excel Worksheet Functions 0 March 2nd 06 03:25 PM
How can I import a PDF into Excel? JD Excel Discussion (Misc queries) 1 October 5th 05 05:55 PM


All times are GMT +1. The time now is 10:17 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"