Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Narrow Range based on Selection in Another Range | Excel Discussion (Misc queries) | |||
Macros to protect worksheet and prevent locked cell selection | Excel Discussion (Misc queries) | |||
Identifying a selection of a selection of a range | Excel Worksheet Functions | |||
Range Selection | Excel Discussion (Misc queries) | |||
Selection Range | Excel Discussion (Misc queries) |