Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Use Autofill in a macro to fill blank cells until next text -

Bernie - looking for same aid here and hoping you can help

I started with a pivot table - copied and pasted values - and now i am
trying to fill in the blanks in the first 2 columns of what was my pivot
table so i can filter and sort on newly created columns alongside the pivot.

Is there a way to autofill until new text? Is it by column?

Thanks n advance.
goldy

"Bernie Deitrick" wrote:

Marika,

Range("F9:G9").AutoFill _
Destination:=Range("F9", Range("G9").End(xlDown)(0))

Is 1981 your birth year? That's the year I graduated from MIT....I feel
REALLY old now.....

HTH,
Bernie
MS Excel MVP

"marika1981" wrote in message
...
Desperately in need of some guidance.....

I'm creating a spreadsheet for a non-Excel end-user, thus trying to

automate
the process almost entirely. Each week, they'll insert about 50 rows of
weekly raw data in five columns at the TOP of a
table using a macro i created based on InsertCopiedCells. However, in the
two columns to the right of the data there need to be two simple formulae
added after any new data is inserted - each week, slighty different.

So, for example, let's say our table consists of rows 10-450 and has five
columns of data (A:E) and two columns of formulae (F:G). Then User X

inserts
45 more rows of data at the top. Now rows 10-55 have five columns of

data,
but no formulae in columns 6 and 7. Starting in row 56, the rows have the
seven complete columns. I'm trying to write a macro that will highlight

the
range F10:G55 (though the number of new rows each week will vary) and

insert
the fomulae in the blanks - essentially performing Cntrl-Shift-Down -1.
***Note, I do have a hidden row above (row 9) that includes the formulae

to
better enable autofill, if that's the best way.

Any ideas you have would be so much appreciated!!

THANK YOU SO MUCH!!!!!

Marika :)




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Use Autofill in a macro to fill blank cells until next text -

Dim rng as Range, rng1 as Range
set rng = Columns(1).Resize(,2)
set rng1 = rng.SpecialCells(xlBlanks)
rng1.Formula = "=" & rng1(1).Offset(-1,0).Adress(0,0)
rng.Formula = rng.Value

--
Regards,
Tom Ogilvy


"goldyjk" wrote in message
...
Bernie - looking for same aid here and hoping you can help

I started with a pivot table - copied and pasted values - and now i am
trying to fill in the blanks in the first 2 columns of what was my pivot
table so i can filter and sort on newly created columns alongside the

pivot.

Is there a way to autofill until new text? Is it by column?

Thanks n advance.
goldy

"Bernie Deitrick" wrote:

Marika,

Range("F9:G9").AutoFill _
Destination:=Range("F9", Range("G9").End(xlDown)(0))

Is 1981 your birth year? That's the year I graduated from MIT....I feel
REALLY old now.....

HTH,
Bernie
MS Excel MVP

"marika1981" wrote in message
...
Desperately in need of some guidance.....

I'm creating a spreadsheet for a non-Excel end-user, thus trying to

automate
the process almost entirely. Each week, they'll insert about 50 rows

of
weekly raw data in five columns at the TOP of a
table using a macro i created based on InsertCopiedCells. However, in

the
two columns to the right of the data there need to be two simple

formulae
added after any new data is inserted - each week, slighty different.

So, for example, let's say our table consists of rows 10-450 and has

five
columns of data (A:E) and two columns of formulae (F:G). Then User X

inserts
45 more rows of data at the top. Now rows 10-55 have five columns of

data,
but no formulae in columns 6 and 7. Starting in row 56, the rows have

the
seven complete columns. I'm trying to write a macro that will

highlight
the
range F10:G55 (though the number of new rows each week will vary) and

insert
the fomulae in the blanks - essentially performing

Cntrl-Shift-Down -1.
***Note, I do have a hidden row above (row 9) that includes the

formulae
to
better enable autofill, if that's the best way.

Any ideas you have would be so much appreciated!!

THANK YOU SO MUCH!!!!!

Marika :)






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
NEED TO FILL BLANK CELLS IN DATA WITH TEXT STRING Stewcrew Excel Worksheet Functions 8 January 16th 11 05:48 AM
NEED TO FILL BLANK CELLS WITH TEXT STRING Stewcrew Excel Discussion (Misc queries) 1 May 17th 07 01:10 AM
macro to fill blank cells Sunny Links and Linking in Excel 1 March 24th 06 09:09 AM
Use Autofill in a macro to fill blank cells until next text - Bernie Deitrick Excel Programming 0 February 18th 05 06:45 PM
A macro to fill in the blank cells jer101[_3_] Excel Programming 7 June 18th 04 03:13 AM


All times are GMT +1. The time now is 03:24 PM.

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"