Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
good morning,
i've this problem. i need a method to count the number og elemnts i get in a column, let say column A and use this number to set the range for my formulas and loop. i tried this: dim h as integer Range("M2").Select ActiveCell.FormulaR1C1 = "=IF(R[-1]C[-12]=0,0,1)" Selection.AutoFill destination:=Range("M2:M15000") Range("M15001").Select h = ActiveCell.FormulaR1C1 = "=SUM(R[-14999]C:R[-1]C)" (whit this formula, in column M, i set 1 if there is an value in A else 0. then h is the sum on all the values in Column M.) and then Range("G2").Select ActiveCell.FormulaR1C1 = "=RC[-5]*RC[-3]" Range("G2").Select Selection.AutoFill destination:=Range(.Cells(7, 2), .Cells(7, h)) or also Range("G2").Select ActiveCell.FormulaR1C1 = "=RC[-5]*RC[-3]" Range("G2").Select Selection.AutoFill destination:=Range("g2:gh") but it does not work. what i'm wrong? thank's in advance ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to count#cells w/= value in other column and not count blank c | Excel Worksheet Functions | |||
Count number of cells and total in one column, based on another column suffix | Excel Worksheet Functions | |||
Count Intervals of 1 Numeric value in a Row and Return Count down Column | Excel Worksheet Functions | |||
Count Intervals of Filtered TEXT values in Column and Return Count across a Row | Excel Worksheet Functions | |||
COUNT INFORMATION IN COLUMN B ONLY IF A1 MATCHES K1 COUNT THAT CE. | Excel Worksheet Functions |