Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a list of name and data which is gapped and need filling in.
column a row 1 has name1 in it this needs copying down into all the empty cells under it until the next populated cell. this will work until the bottom row i guess where i dont want it to copy till the end of the sheet. so i have a number in column J which is also the amount of empty rows till the next populated cell below, can it run off this. any help would be awesome. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this....
Sub InsertDataintoBlank() lngLastRow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row For lngRow = 1 To lngLastRow If Trim(Range("A" & lngRow)) < "" Then strData = Range("A" & lngRow) Else Range("A" & lngRow) = strData End If Next End Sub -- If this post helps click Yes --------------- Jacob Skaria "project manager" wrote: I have a list of name and data which is gapped and need filling in. column a row 1 has name1 in it this needs copying down into all the empty cells under it until the next populated cell. this will work until the bottom row i guess where i dont want it to copy till the end of the sheet. so i have a number in column J which is also the amount of empty rows till the next populated cell below, can it run off this. any help would be awesome. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
works a charm apart from (Rows.Count, "B").End...
should be "A" thanks very much p "Jacob Skaria" wrote: Try this.... Sub InsertDataintoBlank() lngLastRow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row For lngRow = 1 To lngLastRow If Trim(Range("A" & lngRow)) < "" Then strData = Range("A" & lngRow) Else Range("A" & lngRow) = strData End If Next End Sub -- If this post helps click Yes --------------- Jacob Skaria "project manager" wrote: I have a list of name and data which is gapped and need filling in. column a row 1 has name1 in it this needs copying down into all the empty cells under it until the next populated cell. this will work until the bottom row i guess where i dont want it to copy till the end of the sheet. so i have a number in column J which is also the amount of empty rows till the next populated cell below, can it run off this. any help would be awesome. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Without using a macro you can achieve this..
If A2 is blank, type formula =A1. Copy the cell. Select Col A. Press F5. From Goto window click Special and then select Blanks which will select all the blank cells in Col A. Then try Paste special --Formulas. If this post helps click Yes --------------- Jacob Skaria "project manager" wrote: I have a list of name and data which is gapped and need filling in. column a row 1 has name1 in it this needs copying down into all the empty cells under it until the next populated cell. this will work until the bottom row i guess where i dont want it to copy till the end of the sheet. so i have a number in column J which is also the amount of empty rows till the next populated cell below, can it run off this. any help would be awesome. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If (Vlookup 0) working, but what if Vlookup cell does not exist | Excel Worksheet Functions | |||
VLookUp - Does the VLookUp return the exact information? | Excel Worksheet Functions | |||
using a vlookup to enter text into rows beneath the vlookup cell | Excel Programming | |||
Vlookup in vlookup - taking the result as array name | Excel Worksheet Functions | |||
Which is faster: VLOOKUP-worksheet or VB-array VLOOKUP? | Excel Programming |