Excel VBA: Dynamic Data Validation Input Message with Index Match -


with data validation input message, each cell in named range ("myrange"), i'd match against table1[column1] , index in value table1[column2].

i need loop, since doesn't, active cell remains constant, , entire range has same input message. i'm not committed formula index match, needs perform function.

sub tester()     dim mycell string     mycell = activecell         range("myrange").validation         .delete         .add type:=xlvalidatelist, alertstyle:=xlvalidalertinformation, _         operator:=xlbetween, formula1:="=indirect(test1&test2)"         .ignoreblank = true         .incelldropdown = true         .inputtitle = ""         .errortitle = ""         .inputmessage = application.worksheetfunction.index(range("table1[column2]"), _         application.worksheetfunction.match(mycell, range("table1[column1]"), 0))         .errormessage = ""         .showinput = true         .showerror = false     end end sub 

thank help!

wrap around code have now. basically, want paste code line reads debug.print . . . minor modifications.

sub looprange()      dim rcell range     dim rrng range      set rrng = sheet1.range("a1:a6")      each rcell in rrng.cells         debug.print rcell.address, rcell.value     next rcell  end sub 

loop through each cell in range of cells when given range object


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -