ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Filling Blank Cells (https://www.excelbanter.com/excel-programming/317929-filling-blank-cells.html)

jules

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





Dave Peterson[_5_]

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

jude

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






John Ransom

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









All times are GMT +1. The time now is 09:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com