Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macros - Range Selection

I have a spreadsheet with data in columns 1 thru 5. In
column 6, I want the macro to add a value. The number of
rows in the spreadsheet varies. How do I select the same
number of rows in column 6 as are non-blank in columns 1-
5?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Macros - Range Selection

How about a formula?
This sums col B for 4 if there are 4 non blanks in col A
=SUM(INDIRECT("B1:b" & COUNTA(A:A)))
But that doesn't answer your question cuz I can't figure out the question.
Example?
--
Don Guillett
SalesAid Software

"Pam" wrote in message
...
I have a spreadsheet with data in columns 1 thru 5. In
column 6, I want the macro to add a value. The number of
rows in the spreadsheet varies. How do I select the same
number of rows in column 6 as are non-blank in columns 1-
5?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Macros - Range Selection

you can use an if statement in column 6

=if(a1="","",b1*c1)

in this example if there is no data in column a or which
ever column you choose then it leave the cell in column 6
blank. if there is data in the column you specify then a
value will show in column 6. i just used b1*c1, you can
put any formula you want there.

hope this helps.


-----Original Message-----
How about a formula?
This sums col B for 4 if there are 4 non blanks in col A
=SUM(INDIRECT("B1:b" & COUNTA(A:A)))
But that doesn't answer your question cuz I can't figure

out the question.
Example?
--
Don Guillett
SalesAid Software

"Pam" wrote in

message
...
I have a spreadsheet with data in columns 1 thru 5. In
column 6, I want the macro to add a value. The number

of
rows in the spreadsheet varies. How do I select the

same
number of rows in column 6 as are non-blank in columns

1-
5?




.

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
Narrow Range based on Selection in Another Range David Excel Discussion (Misc queries) 3 July 1st 07 05:12 PM
Macros to protect worksheet and prevent locked cell selection Excel Enthusiastic[_2_] Excel Discussion (Misc queries) 1 April 23rd 07 09:44 AM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 02:51 AM
Range Selection cfspahn24 Excel Discussion (Misc queries) 3 April 14th 06 01:29 PM
Selection Range ch Excel Discussion (Misc queries) 5 July 15th 05 05:50 AM


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

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

About Us

"It's about Microsoft Excel"