Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Copy down to next Cell

I have a spreadsheet that is 30000 lines long. I have to copy down a
different value to about 20 spaces below.
For example I have the first value in b2, the the next 20 rows under
this are blank then the new value starts in b22 then the next 20 rows
under this are blank the then new value starts in B42.

How to I fill in the blanks all the way to the end of the 30000 lines?

Thanks
Sam

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Copy down to next Cell

try this macro:

Sub samc()
n = Cells(Rows.Count, "B").End(xlUp).Row
For i = 3 To n
If (IsEmpty(Cells(i, "B"))) Then
Cells(i, "B").FillDown
End If
Next
End Sub

--
Gary''s Student - gsnu200737


" wrote:

I have a spreadsheet that is 30000 lines long. I have to copy down a
different value to about 20 spaces below.
For example I have the first value in b2, the the next 20 rows under
this are blank then the new value starts in b22 then the next 20 rows
under this are blank the then new value starts in B42.

How to I fill in the blanks all the way to the end of the 30000 lines?

Thanks
Sam


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 860
Default Copy down to next Cell

Hi Sam,

If I understand you correctly,

Insert a helper column C
Put this in C2
=IF(B20,B2,C1)
and drag down to the end of your data.

Then select column C do a copypaste specialvalues
on it and then delete column B.

HTH
Martin

wrote in message
ups.com...
I have a spreadsheet that is 30000 lines long. I have to copy down a
different value to about 20 spaces below.
For example I have the first value in b2, the the next 20 rows under
this are blank then the new value starts in b22 then the next 20 rows
under this are blank the then new value starts in B42.

How to I fill in the blanks all the way to the end of the 30000 lines?

Thanks
Sam



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Copy down to next Cell

Select column B2 then SHIFT + End + Downarrow then F5SpecialBlanksOK

Enter an = sign in active cell which should be B3

Point or arrow up to B2 and CRTL + ENTER

Copy then paste specialvaluesOKEsc


Gord Dibben MS Excel MVP

On Tue, 14 Aug 2007 06:59:11 -0700, wrote:

I have a spreadsheet that is 30000 lines long. I have to copy down a
different value to about 20 spaces below.
For example I have the first value in b2, the the next 20 rows under
this are blank then the new value starts in b22 then the next 20 rows
under this are blank the then new value starts in B42.

How to I fill in the blanks all the way to the end of the 30000 lines?

Thanks
Sam


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Copy down to next Cell

Make that "select B2 then.........."


Gord

On Tue, 14 Aug 2007 07:59:19 -0700, Gord Dibben <gorddibbATshawDOTca wrote:

Select column B2 then SHIFT + End + Downarrow then F5SpecialBlanksOK

Enter an = sign in active cell which should be B3

Point or arrow up to B2 and CRTL + ENTER

Copy then paste specialvaluesOKEsc


Gord Dibben MS Excel MVP

On Tue, 14 Aug 2007 06:59:11 -0700, wrote:

I have a spreadsheet that is 30000 lines long. I have to copy down a
different value to about 20 spaces below.
For example I have the first value in b2, the the next 20 rows under
this are blank then the new value starts in b22 then the next 20 rows
under this are blank the then new value starts in B42.

How to I fill in the blanks all the way to the end of the 30000 lines?

Thanks
Sam




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 663
Default Copy down to next Cell

Hi,

Do the following:
1. Enter a value in cell B2. (for example, enter 22)
2. Select a range from B2:B20.
3. Press Ctrl+D.
4. Repeat the Step 1 to Step 3 after entering a new value in cell 23.

Challa Prabhu

" wrote:

I have a spreadsheet that is 30000 lines long. I have to copy down a
different value to about 20 spaces below.
For example I have the first value in b2, the the next 20 rows under
this are blank then the new value starts in b22 then the next 20 rows
under this are blank the then new value starts in B42.

How to I fill in the blanks all the way to the end of the 30000 lines?

Thanks
Sam


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 copy the first word or two words from a cell containing a complete sentence to another cell jonny Excel Discussion (Misc queries) 7 May 19th 23 03:43 AM
I copy a formula and the results copy from the original cell brooklynsd Excel Discussion (Misc queries) 1 June 23rd 07 01:35 AM
Data entry - Copy contents of cell typed in one cell to another ce danie Excel Worksheet Functions 2 March 16th 06 06:51 PM
Select cell, Copy it, Paste it, Return to Previous cell spydor Excel Discussion (Misc queries) 1 December 30th 05 01:29 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM


All times are GMT +1. The time now is 10:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"