Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filling Blank Cells
Hi
I have Text(Peoples Names) in Column A of a worksheet with blank spaces in between. I need to copy the Text(Peoples Names) to the next cell in the column. My reference would always have to be the Cell above. If the next Cell contains Text(Peoples Names) then this will be the next reference until the first entire blank row is detected or Blanks are detected in Column B. A1 = Julian A2 = Blank A3 = Jack A4 = Blank A5 = Blank Result A2 to be Julian and A4 and A5 to be Jack I would appreciate any help. Thanks Julian |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filling Blank Cells
Debra Dalgleish has some techniques at:
http://www.contextures.com/xlDataEntry02.html jules wrote: Hi I have Text(Peoples Names) in Column A of a worksheet with blank spaces in between. I need to copy the Text(Peoples Names) to the next cell in the column. My reference would always have to be the Cell above. If the next Cell contains Text(Peoples Names) then this will be the next reference until the first entire blank row is detected or Blanks are detected in Column B. A1 = Julian A2 = Blank A3 = Jack A4 = Blank A5 = Blank Result A2 to be Julian and A4 and A5 to be Jack I would appreciate any help. Thanks Julian -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filling Blank Cells
Go to the first cell containing a name. Click and drag the mouse down to
select all of the cells in column A where you want names to appear. Go to the Edit menu and click the Go To command. In the dialog box click Special. In the next dialog box, click Blanks and hit OK. This should select only the blank cells in Column A. Press the "+" key and then the Up arrow and then press Ctrl-Enter. This should fill each blank cell with a formula referring to the cell above it. "jules" wrote: Hi I have Text(Peoples Names) in Column A of a worksheet with blank spaces in between. I need to copy the Text(Peoples Names) to the next cell in the column. My reference would always have to be the Cell above. If the next Cell contains Text(Peoples Names) then this will be the next reference until the first entire blank row is detected or Blanks are detected in Column B. A1 = Julian A2 = Blank A3 = Jack A4 = Blank A5 = Blank Result A2 to be Julian and A4 and A5 to be Jack I would appreciate any help. Thanks Julian |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filling Blank Cells
Try this... I use it quite often... you will need to program a way to call
it when you want to use it, based on the column that your cursor is currently in. ' ================================================== ======= ' ' Fill_in_Empty_Data Macro ' Fills Data Down a Column of Numbers ' with the number from the preceding cell if ' the current cell is blank. This works very ' well with subtotaled data; for pieces of information ' are not accummulated / processed through the normal ' subtotaling procedures. ' Macro recorded 5/15/97 by John Ransom ' Last Revision 05/15/97 ' Sub Fill_In_Empty_Data() ' Fills-in Missing Data, working down a column ' of Data. Works well with subtotaled data ' ' Dimension Variables Dim x As Integer Dim CurRow As Integer Dim CurCol As Integer Dim CurrentSheet As Integer Dim EndRow As Integer Dim EndCol As Integer On Error GoTo FillHandler ' Turn off Screen Updating Application.ScreenUpdating = False ' Initialize Current cell and worksheet position CurrentSheet = Application.ActiveSheet.Index CurRow = ActiveCell.Row CurCol = ActiveCell.Column ' Select Ending Row and Column of the current worksheet (Lowest Right Corner) Worksheets(CurrentSheet).UsedRange.Select ' Option Numbers for lowest right corner EndRow = Selection.Rows.Count EndCol = Selection.Columns.Count ' Reactivate the current cell Cells(CurRow, CurCol).Activate ActiveCell.Select ' Initialize Variables CurRow = ActiveCell.Row CurCol = ActiveCell.Column ' Debug.Print CurRow, CurCol For x = CurRow To EndRow If Cells(x, CurCol).Value = "" Then Cells(x, CurCol).Value = Cells(x - 1, CurCol).Value End If Next x ' Turn Screen Updating back on Application.ScreenUpdating = True ' Quit this procedure on an error FillHandler: End Sub "Jude" wrote in message ... Go to the first cell containing a name. Click and drag the mouse down to select all of the cells in column A where you want names to appear. Go to the Edit menu and click the Go To command. In the dialog box click Special. In the next dialog box, click Blanks and hit OK. This should select only the blank cells in Column A. Press the "+" key and then the Up arrow and then press Ctrl-Enter. This should fill each blank cell with a formula referring to the cell above it. "jules" wrote: Hi I have Text(Peoples Names) in Column A of a worksheet with blank spaces in between. I need to copy the Text(Peoples Names) to the next cell in the column. My reference would always have to be the Cell above. If the next Cell contains Text(Peoples Names) then this will be the next reference until the first entire blank row is detected or Blanks are detected in Column B. A1 = Julian A2 = Blank A3 = Jack A4 = Blank A5 = Blank Result A2 to be Julian and A4 and A5 to be Jack I would appreciate any help. Thanks Julian |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Filling Blank Cells | New Users to Excel | |||
Filling Blank Cells | Excel Worksheet Functions | |||
Filling Blank Cells | Excel Discussion (Misc queries) | |||
Filling in Blank Cells | New Users to Excel | |||
Filling Blank Cells | Excel Programming |