Results 1 to 4 of 4

compiling a function to search for strike through titles using a cell and a range as input

Threaded View

  1. #1
    Registered User
    Join Date
    11-15-2015
    Location
    israel
    MS-Off Ver
    2013
    Posts
    2

    compiling a function to search for strike through titles using a cell and a range as input

    Hi All,

    I am a new bee for all Excel VBA programming, and I have to say that it is an amassing tool - that I have to learn how to use it.

    I have been trying to compile a VBA function that gets an input of a cell location (A2 for example) and a range of cells to look for, in order to count the amount of strike through titles that have the same content as A2 cell.

    my aim is to copy the function on a large amount of rows, and that my "Cell Location" input will follow the row number.

    please find bellow the code that I have compiled:
    Function CSV(Crng As Range, ParamArray Rng()) As Variant
    
      Dim R As Range, A As Variant
      For Each A In Rng
        For Each R In A
          If R.Font.Strikethrough And R.Value = Worksheets("Sheet2").Range(Crng).Text Then CSV = CSV + 1
        Next
      Next
    End Function
    the amasing thing is that if I change the variable in line 6 instead of "Crng" to a specific cell like "A2" - everything works, but the end result of this function will provide only the amount of strike through font of the title in cell A2.

    I want to be able to copy the function on a large amount of cells and let the cell input follow the row number.

    hopefully you will be able to fix the small issue in hand.

    Appreciate your help and support,

    Yariv
    Last edited by JBeaucaire; 11-19-2015 at 02:46 PM. Reason: Added missing CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Automatically adding columns with titles based on an input cell
    By AskTheConsultant in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2014, 05:57 PM
  2. Replies: 2
    Last Post: 08-12-2014, 12:23 PM
  3. Search Function - Lookup from a cell in a range of cells
    By scottymelloty in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-13-2012, 08:56 AM
  4. Search function won't work on a cell range...?
    By Jini in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-19-2012, 01:14 AM
  5. Vertical strike though cell(s)
    By chupa in forum Excel General
    Replies: 2
    Last Post: 01-11-2012, 02:00 PM
  6. Search Function Using Input Textbox
    By tommib in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-28-2009, 06:44 AM
  7. [SOLVED] How do you do a strike out in an Excel cell?
    By dgalati in forum Excel General
    Replies: 1
    Last Post: 01-24-2005, 06:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1