excel - Finding a cell on one sheet, picking up data from the same cell on a different sheet -


basically, comparing sales figures previous years , want macro when new months data added compare same month last year.

i have set macro find last cell data in pull through recent months data current year. there way select same cell on different sheet? cannot use same system of finding last line data because on previous years data complete.

i hope makes sense! thanks!

  1. find cell on first sheet
  2. get address
  3. use address value second sheet

for example:

sub samecelldifferentsheet()   dim r range, addy string   set r = sheets("sheet1").cells.find("happiness")   addy = r.address   othervalue = sheets("sheet2").range(addy) end sub 

Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -