Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Specifying a countif function within VB

I declared a range within a sheet of data which does the
countif function differentiates between multiple
variables. It works great however, there is an additional
factor in one of my variables that I want it to count only
if that statement is true and not count if its not true.
the statement is two columns to the left.. Thanks for your
help in advance.


''''Code is as follows
Dim IDSrng As Range
Dim Fname As String
Dim GS As String

Fname = ActiveWorkbook.Name

Range(Selection, Selection.End(xlDown)).Name = "IDSrng"

GS = "=COUNTIF(" & "'" & Fname & "'!IDSrng,""Golf Shoes"")"

ActiveWindow.ActivateNext

ActiveCell.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = FOB

''''''''''Here i need to specify to the left 2 columns
'' ''''(activecell.offset(0,-2).select)
'''''if it is either womans or mens golf shoes

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
COUNTIF Function PatJennings Excel Worksheet Functions 4 June 4th 08 08:54 PM
please help how to combine IF function with Countif function Dinesh Excel Worksheet Functions 6 March 30th 06 08:28 PM
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
Embed a countif function in subtotal function? Stuck at work Excel Worksheet Functions 1 February 14th 06 03:19 AM
countif function Steve Excel Worksheet Functions 2 July 21st 05 06:42 PM


All times are GMT +1. The time now is 01:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"