excel - Macro query spread over multiple-sheets -


wording question tricky i've included screen-shots make easier. have 2 separate spreadsheets not linked in anyway. i've been asked is:

for drop-downs have * next them, have * drop-down converted acronym (i.e. if it's home visit *, converted hv), , have automatically entered cell position x. please refer image 1 image 2)

image oneimage 2

so user click on sheet one, select relevant drop-down field , assign how time task took. second sheet update information - insert users name, program , activities. gets tricky. based off drop-down selection, if asterisked (*), based off field-type convert set acronym placed in 1 of data fields based off entry date has been provided.

i designed both spread-sheets , have macros in background, can't seem work out how best perform this. suggest transpose function checks firstly date criteria , index(match) function match criteria against pre-defined name-range converts home visit etc. hv automatically? i'm unsure of how insert delimiters each new entry read. if can provide grateful.snapshot of screen1

i'm not 100% sure understand question, here goes:

what adding worksheet_change event changes in drop-down's cell, , converting acronym?

place following code inside sheet of interest:

private sub worksheet_change(byval target range)      'if cell a1 changed, put acronym a2     if target.row = 1 , target.column = 1         cells(2, 1) = getacronym(target.value)     end if  end sub  function getacronym(thetext string) string      dim result string     dim x long      'always grab first letter     result = mid(thetext, 1, 1)      'get other letters     x = 2 len(thetext) - 1         if mid(thetext, x, 1) = " " result = result & mid(thetext, x + 1, 1)     next x      getacronym = ucase(result)  end function 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -