Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA - Action if a cell holds a certain value?
I am just running an excercise to see if I can expand a loopin
function. I have a column that is basically a toggle that holds either an X o nothing. I would like to go through each row of this column and d something if there is an X there. For now I am just going to count th X's essentially writing a countif function. Later it will not coun but copy things to other areas based on the X. I am a novice at VB, but I do have a little bit of C++ knowledge. have come up with something that doesn't work but am not sure where t go from here. Here is the code that I have: Sub Copy() Dim Store As Integer Store = 0 For Each c In Worksheets("SPARE9").Range("O11:O92").Cells If c.WorksheetFunction.Value Eqv Val("x") Then Store = Store 1 Next Range("A1").Select ActiveCell.FormulaR1C1 = Store End Sub Any Ideas? Thanks, Andre -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excell copy action pauses for 15 second for the smallest action | Excel Discussion (Misc queries) | |||
2007: xlsm format holds how many columns? | Excel Discussion (Misc queries) | |||
How to make Same formula over multiple rows but still holds row # | Excel Worksheet Functions | |||
how can I customise a toolbar with a tag that holds macros | Charts and Charting in Excel | |||
How do I create a footnote for a cell that holds a SUM function . | Excel Discussion (Misc queries) |