+ Reply to Thread
Results 1 to 4 of 4

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

  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:
    Please Login or Register  to view this content.
    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.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: compiling a function to search for strike through titles using a cell and a range as i

    With sample file would be easier to test, but try:

    Please Login or Register  to view this content.
    PS. plaese follow our http://www.excelforum.com/forum-rule...rum-rules.html : edit your post and apply code tags.
    Last edited by JBeaucaire; 11-19-2015 at 02:46 PM.
    Best Regards,

    Kaper

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

    Re: compiling a function to search for strike through titles using a cell and a range as i

    Wow, Kaper you were extremely quick .... thank you for your modification.

    your solution works perfectly well for me, but I wonder why did not it work using my initial code?

    Appreciate your help and awaiting for your explanation.

    Yariv.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: compiling a function to search for strike through titles using a cell and a range as i

    In your line of code
    Please Login or Register  to view this content.
    ...you inadvertently tried to use a range object as if it were a text string.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

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