excel vba - Multiple cell selection in VBA using ActiveCell.Offset(0, 1).Value -


i'm starting in vba , had program able retrieve value selected cell used reference.

i'm able when select 1 cell activecell function , playing around activecell.offset(0, 1).value etc. how make same thing while selecting multiple cells @ same time , able take 1 cell value @ time , activecell.offset... identify second cell value , retrieve proper information , on.

using macro recorder see when select multiple values point to

range("y8,y9,y10,y11").select 'etc.... 

thank , hope i've been precise enough on i'm trying do.

many olivier

i know kinda late , op has solution think wants can achieved using selection like:

dim r range, c range  if typeof selection range set r = selection else exit sub  each c in r     '/* put code want here */     debug.print c.address     debug.print c.offset(0,1).value next 

posting answer in case stumbled on same problem/issue/requirement.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -