+ Reply to Thread
Results 1 to 5 of 5

Data Counter via InputBox

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    Bosnia and Herzegovina
    MS-Off Ver
    Excel 2010
    Posts
    35

    Data Counter via InputBox

    I would like to set up a counter for some of my data.

    So,there would be certain amount of data entries already typed in in sheet over a 4,5 columns.
    A certain cell(adjacent one) would be assigned as a 'counter' cell.
    So,if B1 contains Data,then B2 would be a cell which would contain a counter number.

    The counting would be performed via InputBox.
    Entries would be "case free",so "4evra" would be equal to "4EVRA"

    I click a button,InputBox runs,in it i enter "4evra"
    If there is an entry in any of the columns in that sheet,a "counter" cell(cell that is column+1 away from entry) would get a +1 to its value.
    Starting value would be a 1 offcourse.
    If the word inputed does not not exist as an entry in excel,the input box would return an error or a notification about it,but it wouldn't create new entry.

    A similar code was provided to me earlier by a kind member of forum,but,i just cant grasp some code lines in it,like how does it manages to do increments on counter values,so i can't modify it alone.
    Here is the link to that code: http://www.excelforum.com/excel-prog...e-entered.html
    Last edited by 4evra; 05-30-2013 at 12:49 PM.

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Data Counter via InputBox

    Catching up:
    I didn't get where the data is as you said, 4-5 columns, could you upload a sample workbook?
    and try this:
    Please Login or Register  to view this content.
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Registered User
    Join Date
    01-25-2013
    Location
    Bosnia and Herzegovina
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Data Counter via InputBox

    I don't know if its a problem for you to bother explainining to me the function of the code,or its easier just to toss in a functional one :D
    Anyways,if u find time to do it,i would appreciate if you pointed me out in right direction with these:
    -u dropped the "," part,which was a separator in earlier code.but,there still is a (split) feauture.I thought split was used with separator,now i see it has function even without it.What function would that be?
    -Cint(from what i saw,round a value to its 'numerical' value?How does that help compare text strings?
    -what does the "~" do?Tried googling it,but it tosses out different codes,and i didnt' yet run into a part of VBA manual explaining it.


    Anyways,as far as topic goes,here is an example excel file
    example.xlsx

    Now,i added a text in excel file to help u figure out what i want to archieve.
    Cheers,and thanks

  4. #4
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Data Counter via InputBox

    Hi,
    Counter.xlsm
    I changed it to simpler code:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-25-2013
    Location
    Bosnia and Herzegovina
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Data Counter via InputBox

    Many thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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