Link to home
Start Free TrialLog in
Avatar of Jagwarman
Jagwarman

asked on

vba to add items to an existing list

I have a [very] hidden list which is usedin a Vlookup, if the Vlookup cannot find what it is looking up it returns 'Not inRegion List'

I would like to add a button to the worksheet that allows the user to add the details to the bottom of the list without the need of unhiding the sheet.

The list is in a worksheet called Static and has two columns. Column A is Market column B is Region. The list has been named as Regions.

Can an expert assist with this one please.

Thanks
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

Sheets("Static").Range("A" & Sheets("Static").Range("A" & Rows.Count).End(xlUp).Row).Value = "whatever value"
Sheets("Static").Range("B" & Sheets("Static").Range("B" & Rows.Count).End(xlUp).Row).Value = "whatever value"
Avatar of Rgonzo1971
Rgonzo1971

Hi

pls try

With Sheets("Static")
    .Range("A" & .Range("A" & Rows.Count).End(xlUp).Row+1).Value = "whatever value"
    .Range("B" & .Range("B" & Rows.Count).End(xlUp).Row+1).Value = "whatever value"
End With 

Open in new window

Regards

We have to add 1 not to overwrite data

Regards
Avatar of Jagwarman

ASKER

Hi Macroshadow.

thanks but I probably did not make my spec clear enough. What I need is a pop up window that willallow the user to in put the information that will then add it to the bottom of the list.

I have tested yours and it only seems to add it to the bottom of the existing kist so if I run yours once it adds whatever value then if I try to add [say Friday] it overwrites whatever value.

So in a nutshell I am looking for the code to present the user with a pop up that they can enter the details in which will then add the details to the bottom of the list.

many thanks
Regards
ASKER CERTIFIED SOLUTION
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Exactly what I need thanks