Macros - Range Selection

  • Thread starter Thread starter Pam
  • Start date Start date
P

Pam

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?
 
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?
 
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.
 
Back
Top