Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
i written a macro where an inputbox retrives the user's name, and then a welcome msg to the user is then displayed in a msgbox.. The names of the user's who enter their name in this login inputbox, is compiled into row1 of a spreadsheet... i was wondering if anyone could help tell me how i could, take the data entry and ensure it doesnt repeat itself while it adds to the rows... example :- if the the macro below is used and the name Tim is used 3 times, it will appear from cell a1-a3 in the spreadsheet.. i was wondering how i could make it so that the names wont be repeated, and a counter can be added on the next row of each name entry. Basically i want my macro to be able to compile a list of users and the number of times they logged in... not having duplicate entries as well.. could someone view my coding below n advice? thanks awhole lot..! __________________________________________________ ____________ Sub Login() Dim Msg, Response Dim Name As String Name = InputBox("Enter Your Name") Msg = "Welcome " & Name Response = MsgBox(Msg) Row = 1 ThisCell = Sheets("sheet1").Cells(Row, 1) Do While ThisCell < "" Row = Row + 1 ThisCell = Sheets("sheet1").Cells(Row, 1) Loop Sheets("sheet1").Cells(Row, 1) = Name End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with InputBox and MsgBox | Excel Discussion (Misc queries) | |||
Help with InputBox and MsgBox | New Users to Excel | |||
msgbox / inputbox etc | Excel Discussion (Misc queries) | |||
msgbox / inputbox etc | Excel Worksheet Functions | |||
msgbox / inputbox etc | Setting up and Configuration of Excel |