vba - Referencing a table to look up values between worksheets in Excel -


ok here's doosy of question:

i work in healthcare, have workbook references values using index:match function based off of patients name, manually enter. pull 7/10 columns using method automatically. 8th column generation date of information , 9th column date/time stamp sheet enter manually based off of patient's room number.

here's tricky part. 2 reports, i'm pulling our bed management program allscripts, don't translate bed names/numbers same way. created translation table in different sheet. question this: there way can use function index:match, vlookup or else within either excel or vba reference translation table in order bed name/number , auto fill information need?

spreadsheet looks this:

https://docs.google.com/spreadsheets/d/1j8b2jz7zuzkpmoqoisfbvccdkw_cwdfwcgl_cco2hco/edit?usp=sharing

so column g on 'raw data page' needs reference column e same page, translate bed name based off of 'bed translation page' , date/time information 'job activity detail' page in column g translated bed. catch bed names repeated on 100k times in current workbook due day day entry of data (i manually change search range in index:match function each column).

i hope can shed light on me, it's been bane of existence 2 years now! appreciate info/help of may able provide! :)

great news man, not need so! pulls in column g job activity detail, identifier on rawdata page equal identifier on job activity detail , name same on job activity detail , portal of entry detail , 2 times in j , m of respective sheets match.

option explicit  sub bd()  dim rdsheet worksheet, jbsheet worksheet, btsheet worksheet dim bdstr, bdendrow, rng range, y, key, gcell, bdcell  set rdsheet = sheets("raw data page") set jbsheet = sheets("job activity detail") set btsheet = sheets("portal of entry detail")  bdstr = rdsheet.range("g3").address bdendrow = rdsheet.range("a3").end(xldown).row set rng = rdsheet.range(bdstr & ":g" & bdendrow)  each y in rng if isempty(y)  key = y.offset(0, -2).value key = replace(key, "-", "")  set gcell = jbsheet.range("a:a").find(what:=key, lookat:=xlpart) set bdcell = btsheet.range("b:b").find(what:=y.offset(0, -4).value, lookat:=xlpart)  if not gcell nothing , btsheet.range("j" & bdcell.row).value = jbsheet.range("m" & gcell.row).value rdsheet.range(y.address) = jbsheet.range("g" & gcell.row)  end if end if next y  end sub 

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -