Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Checking a Range (Couple of Simple Questions)

Status
Not open for further replies.

rossmcl

Programmer
Apr 18, 2000
128
I have a couple of basic Excel VBA questions:

1. I want to check a range for the number of cells with an "A". Is there an easy way, other than to loop through the cells one by one.

2. For looping through columns, is there an easy way to convert from A, B C type columns to R1C! reference style (ie you can use a Count in R1C1 format, but how can you loop (ie +1 each time) when you are in A,B,C,D column name style.

Thanks
Ross
 
If you have an range object you can loop trough it by using the property .cells

range.cells(1,1) references the top left cel in the range

Therefore the address is reletive to the top left corner of the range
 
In answer to question one:

Do a keyword search on this Forum for "COUNTIFK"

You should find one thread. It contains some code I wrote and an excel way which should work.

Let me know if you can't find it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top