![]() |
please explain this syntax
cells(r+1,"af").formula= "= countif(" & rngbas.address & "," & cells(r+1,
"AE").address & ")" I think this means that a formula is being inserted in cell (r+1,af). The formula is counting all of the occurrences of the contents of cell(r+1, ae) that can be found in a particular range. I know that rngbas is a range. I do not understand the rngbas.address or the second mention of .address. Please interpret for me. TIA Jeff |
please explain this syntax
Youre right
This snippet inserts a Countif formula in col AF (at row r+1) Countif takes 2 arguments the range to check and the critiiria rngbas.address is the reference to the cells to be counted (must be defined earlier in the code) cells(r+1, "AE").address is a reference to a cell that contains the criteria on which to count them HTH Cheers Simon "Papa Jonah" wrote: cells(r+1,"af").formula= "= countif(" & rngbas.address & "," & cells(r+1, "AE").address & ")" I think this means that a formula is being inserted in cell (r+1,af). The formula is counting all of the occurrences of the contents of cell(r+1, ae) that can be found in a particular range. I know that rngbas is a range. I do not understand the rngbas.address or the second mention of .address. Please interpret for me. TIA Jeff |
please explain this syntax
But why the ".address" following "cells(r+1,"AE")? Isn't cells(r+1,"AE")
already an address? "Simon Murphy" wrote: Youre right This snippet inserts a Countif formula in col AF (at row r+1) Countif takes 2 arguments the range to check and the critiiria rngbas.address is the reference to the cells to be counted (must be defined earlier in the code) cells(r+1, "AE").address is a reference to a cell that contains the criteria on which to count them HTH Cheers Simon "Papa Jonah" wrote: cells(r+1,"af").formula= "= countif(" & rngbas.address & "," & cells(r+1, "AE").address & ")" I think this means that a formula is being inserted in cell (r+1,af). The formula is counting all of the occurrences of the contents of cell(r+1, ae) that can be found in a particular range. I know that rngbas is a range. I do not understand the rngbas.address or the second mention of .address. Please interpret for me. TIA Jeff |
please explain this syntax
When you reference a cell: cells(r+1,"AE") the default result is the VALUE
in the cell, not the address of the cell. If you want the address you have to state that with cells(r+1,"AE").address "Papa Jonah" wrote: But why the ".address" following "cells(r+1,"AE")? Isn't cells(r+1,"AE") already an address? "Simon Murphy" wrote: Youre right This snippet inserts a Countif formula in col AF (at row r+1) Countif takes 2 arguments the range to check and the critiiria rngbas.address is the reference to the cells to be counted (must be defined earlier in the code) cells(r+1, "AE").address is a reference to a cell that contains the criteria on which to count them HTH Cheers Simon "Papa Jonah" wrote: cells(r+1,"af").formula= "= countif(" & rngbas.address & "," & cells(r+1, "AE").address & ")" I think this means that a formula is being inserted in cell (r+1,af). The formula is counting all of the occurrences of the contents of cell(r+1, ae) that can be found in a particular range. I know that rngbas is a range. I do not understand the rngbas.address or the second mention of .address. Please interpret for me. TIA Jeff |
All times are GMT +1. The time now is 06:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com