#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default CF, MACRO???

I am not sure what to use but here is the situation:
I have a macro that Ron Bruin brilliantly helped with that combines data in
several tabs into one summary sheet and that works great..

Then, in the summary sheet I need to add formulas that "automatically" copy
down rows and into columns based on if there is a text in a certain cell in
that row.. if there isn't, then I need the condition/macro to stop..

I have tried a couple of different things and nothing is working so
obviously I am lost and need help from the wonderfully brilliant folks here..

Thank you in advance for your time and assistance..


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default CF, MACRO???

You might be able to modify this and add it to your existing code.

'========
Sub CreatesFormulas()

'Where do you want formula?
For Each cell In Range("B:B")
'What column are you checking for text?
If Cells(cell.Row, "A").Text < "" Then
'What is the formula?
'Use double quotes if actual formula
'would contain a single quotation
cell.Formula = "=COUNTIF(A:A,""Bob"")"
End If
Next
End Sub
'=============
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Tree" wrote:

I am not sure what to use but here is the situation:
I have a macro that Ron Bruin brilliantly helped with that combines data in
several tabs into one summary sheet and that works great..

Then, in the summary sheet I need to add formulas that "automatically" copy
down rows and into columns based on if there is a text in a certain cell in
that row.. if there isn't, then I need the condition/macro to stop..

I have tried a couple of different things and nothing is working so
obviously I am lost and need help from the wonderfully brilliant folks here..

Thank you in advance for your time and assistance..


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 257
Default CF, MACRO???

"Wonderfully brilliant", that must be me!

If you don't know how to write a macro yourself and don't care to start
learning, then I imagine you don't want to modify Mr Bruin's macro either, in
other words you'd prefer to stick with worksheet functions. That may be
possible, but first I need to know exactly what you want copied: what does
"down rows and into columns" mean, exactly? The rest of it may be a bit
complicated but should be possible.

--- "Tree" wrote:
I have a macro that Ron Bruin brilliantly helped with that
combines data in several tabs into one summary sheet and
that works great. Then, in the summary sheet I need to add
formulas that "automatically" copy down rows and into
columns based on if there is a text in a certain cell in
that row.. if there isn't, then I need the condition/macro to stop.

I have tried a couple of different things and nothing is working
so obviously I am lost and need help from the wonderfully
brilliant folks here.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default CF, MACRO???

THANK YOU TO BOTH!!
I think this will work, except I of course assumed you could read my mind
and knew exactly all the other particulars of the situation!! I am very sorry
to be so dense..
Here is a (hopefully) better specific detail of the situation:
Columns I:L would contain the formulas and they would be looking in Column C
for text and if finding text in that column, the formulas would run in each
column, i.e., Column I takes Column D + Column E - Column F.. Column J takes
Column D + Column E - Column H. Column K = Column G. Column L is the formula
Column J - Column K.
And these formulas need to "copy down and into succeeding rows" into Columns
I through L as long as there is text filling in Column C.
Columns A through H data is already there from the Ron Bruin macro which is
based on constantly changing data on individual tabs throughout the workbook.
I am ok with adding macros and feel a little comfortable with the VB world..
albeit not as comfortable as you wonderfully brilliant folks! :)..
thank you again for your time!


"Luke M" wrote:

You might be able to modify this and add it to your existing code.

'========
Sub CreatesFormulas()

'Where do you want formula?
For Each cell In Range("B:B")
'What column are you checking for text?
If Cells(cell.Row, "A").Text < "" Then
'What is the formula?
'Use double quotes if actual formula
'would contain a single quotation
cell.Formula = "=COUNTIF(A:A,""Bob"")"
End If
Next
End Sub
'=============
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Tree" wrote:

I am not sure what to use but here is the situation:
I have a macro that Ron Bruin brilliantly helped with that combines data in
several tabs into one summary sheet and that works great..

Then, in the summary sheet I need to add formulas that "automatically" copy
down rows and into columns based on if there is a text in a certain cell in
that row.. if there isn't, then I need the condition/macro to stop..

I have tried a couple of different things and nothing is working so
obviously I am lost and need help from the wonderfully brilliant folks here..

Thank you in advance for your time and assistance..


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 help to update macro to office 2007 macro enabled workbook jatman Excel Discussion (Misc queries) 1 December 14th 07 01:57 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


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