updating dynamic via drop down list

dsmdude

New Member
Joined
Mar 19, 2009
Messages
4
http://www.gfcproducts.com/purchase_order_log.xls


I would like to be able to add to my dynamic ranges in the data sheet via the drop down boxes.
If the company is not in the range on my data sheet, i would like to be able to just type in a new one in the drop down box and it will automatically update the data sheet column for company.

I have read alot of other people's efforts on making this work, and I did exactly what was recommended for the other people, and it did not work for me.

If anyone can help out with this, that would be great!

Also, if anyone has any better ideas on how to setup this purchase order log, I would much appreciate it!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi dsmdude,

Try this...right click the sheet tab (~ Purchase Order Log ~) and paste this code on the right side of the screen.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lReply As Long
    If Target.Cells.Count > 1 Then Exit Sub
    If Target.Column <> 3 Then Exit Sub 'Limits code to column "C"
    If IsEmpty(Target) Then Exit Sub
    If WorksheetFunction.CountIf(Sheets("Data").Range("company"), Target) = 0 Then
    lReply = MsgBox("Add " & Target & " to list", vbYesNo + vbQuestion)
    If lReply = vbYes Then
    Sheets("Data").Range("company").Cells(Sheets("Data").Range("company").Rows.Count + 1, 1) = Target
    End If
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,989
Messages
6,122,622
Members
449,093
Latest member
catterz66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top