+ Reply to Thread
Results 1 to 6 of 6

Help me continue my code (suming all the vlookup result)

  1. #1
    Forum Contributor
    Join Date
    03-12-2012
    Location
    Singapore
    MS-Off Ver
    MS 365
    Posts
    532

    Help me continue my code (suming all the vlookup result)

    Hi, just for fun, i tried to see if possible to sum the Alphabet in a Cell, example A=1, B=2.....Z=26
    I create a table, Column A is all the alphabet, Column B is 1 to 26, below is my extract of my code, i get stuck at the ...... part. Anyone can help me continue? Anyway, just curious, possible to make it case-sensitive and how to make it not case-sensitive by adding a variable in the function. Like abcsum(abc,0 or 1) 0 = case sensitive and 1 = not case sensitive. Possible?


    [code]

    Function abcsum(abc As String) As Integer
    Dim i As Long
    i = Len(abc)
    For i = 1 To Len(abc)
    abcsum = Application.VLookup(Left(abc, i), Range("A:B"), 2, 0)
    abcsum = abcsum + ......

    Next i
    End Function

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Help me continue my code (suming all the vlookup result)

    It seems is missing code tags around you code example
    In case it is case sensitive which value to use for UPPER case and for LOWER case ???
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Contributor
    Join Date
    03-12-2012
    Location
    Singapore
    MS-Off Ver
    MS 365
    Posts
    532

    Re: Help me continue my code (suming all the vlookup result)

    In my column A, its uppercase. HOwever, when i tested using vlookup "a". It will give me the result 1. Anyway, how do amend my code such that it will work regardless of case sensitive or not. I kind of stuck at that ...... part.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Help me continue my code (suming all the vlookup result)

    Do not forget code tags
    Try
    Please Login or Register  to view this content.
    Last edited by PCI; 05-21-2018 at 04:38 AM.

  5. #5
    Forum Contributor
    Join Date
    03-12-2012
    Location
    Singapore
    MS-Off Ver
    MS 365
    Posts
    532

    Re: Help me continue my code (suming all the vlookup result)

    Your code work, but how do i exclude those error? Like number, space, comma etc?

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Help me continue my code (suming all the vlookup result)

    See
    Please Login or Register  to view this content.

+ 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. two days suming using vlookup
    By avk in forum Excel General
    Replies: 2
    Last Post: 12-29-2010, 05:40 AM
  2. continue code
    By stevesunfold in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-30-2008, 10:01 AM
  3. Vlookup and Suming columns
    By Paul1975 in forum Excel General
    Replies: 1
    Last Post: 10-08-2008, 10:30 AM
  4. SUMing several VLOOKUP Values
    By aikorei in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-07-2007, 07:51 PM
  5. continue VLOOKUP to next value
    By rich in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-23-2006, 09:10 PM
  6. VB code to continue macro
    By Brian in forum Excel General
    Replies: 3
    Last Post: 05-08-2006, 10:15 PM
  7. Continue executing code
    By Henrich in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2006, 08:35 AM
  8. [SOLVED] Allow code to continue regardless
    By Pat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-19-2005, 11:06 AM

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