Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Excel 97. Can someone please help me with some code. I am
importing a text file by setting the field widths myself. In the main it imports fine but there are several rows of data which a number is imported in the cell preceding the text I require. Running the text to columns again splits them up, is there a way to go through the entire column and delete the numeric cell? I hope I've explained what I'm after! -- Mark |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do you mean you have the situation where the data in the rows with numbers
is offset? eg: A B C D Q W E 1 Q W E Q W E Q W E 1 Q W E If so, I assume you want to find the cells with a numeric value in the first column, delete the cell and shift the remaining row cells left. Is this correct? This will find a numeric value in column A. For another column, replace the 1 in the Cells reference to the relevant column number. Also replace 1 To 10 to suit your row range. Sub FindAndDeleteNumeric() For r = 1 To 10 If IsNumeric(Cells(r, 1)) Then Cells(r, 1).Delete Shift:=xlShiftToLeft End If Next r End Sub -- Ian -- "Mark" wrote in message ... I am using Excel 97. Can someone please help me with some code. I am importing a text file by setting the field widths myself. In the main it imports fine but there are several rows of data which a number is imported in the cell preceding the text I require. Running the text to columns again splits them up, is there a way to go through the entire column and delete the numeric cell? I hope I've explained what I'm after! -- Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Importing CSV file (saved as Text) into XL as Text -- over 60 colu | Excel Discussion (Misc queries) | |||
Importing text file, only option to edit existing file | Excel Discussion (Misc queries) | |||
Importing text file | Excel Discussion (Misc queries) | |||
Need help importing a text file | Excel Programming | |||
importing text file, removing data and outputting new text file | Excel Programming |