#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default pls help

I have data for 6 months Like

Item,Jan,Feb,Mar,Apr,May and Jun more than 1200.
I want to fill function next 5 column.

I have function call sum in column Jan and than some rows with numbers than
again function.

How can i find function in a column and if there is a function than it
should fill that function to next 5 columns cell.
E.G.

if function in cell B12 than it should fill that function to C12,D12,E12,F12
AND G12

Is this possible and help.

Thanks in advance.

****al

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default pls help

Dim rng as Range, ar as Range
set rng = columns(2).specialcells(xlFunctions)
for each ar in rng.areas
for each cell in ar
cell.Resize(1,6).Formula = cell.formula
Next
Next

--
Regards,
Tom Ogilvy


"****al shah" wrote:

I have data for 6 months Like

Item,Jan,Feb,Mar,Apr,May and Jun more than 1200.
I want to fill function next 5 column.

I have function call sum in column Jan and than some rows with numbers than
again function.

How can i find function in a column and if there is a function than it
should fill that function to next 5 columns cell.
E.G.

if function in cell B12 than it should fill that function to C12,D12,E12,F12
AND G12

Is this possible and help.

Thanks in advance.

****al

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default pls help


Thanks Tom Ogilvy for reply me.
But when i run it gives erroer 400 .
any more help possible.
Thanks
****al
"Tom Ogilvy" wrote:

Dim rng as Range, ar as Range
set rng = columns(2).specialcells(xlFunctions)
for each ar in rng.areas
for each cell in ar
cell.Resize(1,6).Formula = cell.formula
Next
Next

--
Regards,
Tom Ogilvy


"****al shah" wrote:

I have data for 6 months Like

Item,Jan,Feb,Mar,Apr,May and Jun more than 1200.
I want to fill function next 5 column.

I have function call sum in column Jan and than some rows with numbers than
again function.

How can i find function in a column and if there is a function than it
should fill that function to next 5 columns cell.
E.G.

if function in cell B12 than it should fill that function to C12,D12,E12,F12
AND G12

Is this possible and help.

Thanks in advance.

****al

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default pls help

Try replacing
xlfunctions
with:
xlCellTypeFormulas

****al shah wrote:

Thanks Tom Ogilvy for reply me.
But when i run it gives erroer 400 .
any more help possible.
Thanks
****al
"Tom Ogilvy" wrote:

Dim rng as Range, ar as Range
set rng = columns(2).specialcells(xlFunctions)
for each ar in rng.areas
for each cell in ar
cell.Resize(1,6).Formula = cell.formula
Next
Next

--
Regards,
Tom Ogilvy


"****al shah" wrote:

I have data for 6 months Like

Item,Jan,Feb,Mar,Apr,May and Jun more than 1200.
I want to fill function next 5 column.

I have function call sum in column Jan and than some rows with numbers than
again function.

How can i find function in a column and if there is a function than it
should fill that function to next 5 columns cell.
E.G.

if function in cell B12 than it should fill that function to C12,D12,E12,F12
AND G12

Is this possible and help.

Thanks in advance.

****al


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default pls help

I thought that looked strange. xlFormulas will work as well. Sorry for the
typo.

--
Regards,
Tom Ogilvy


"Dave Peterson" wrote:

Try replacing
xlfunctions
with:
xlCellTypeFormulas

****al shah wrote:

Thanks Tom Ogilvy for reply me.
But when i run it gives erroer 400 .
any more help possible.
Thanks
****al
"Tom Ogilvy" wrote:

Dim rng as Range, ar as Range
set rng = columns(2).specialcells(xlFunctions)
for each ar in rng.areas
for each cell in ar
cell.Resize(1,6).Formula = cell.formula
Next
Next

--
Regards,
Tom Ogilvy


"****al shah" wrote:

I have data for 6 months Like

Item,Jan,Feb,Mar,Apr,May and Jun more than 1200.
I want to fill function next 5 column.

I have function call sum in column Jan and than some rows with numbers than
again function.

How can i find function in a column and if there is a function than it
should fill that function to next 5 columns cell.
E.G.

if function in cell B12 than it should fill that function to C12,D12,E12,F12
AND G12

Is this possible and help.

Thanks in advance.

****al


--

Dave Peterson

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



All times are GMT +1. The time now is 02:27 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"