Monday 15 June 2015

vba - Excel function or Macro to find and move to new line -



vba - Excel function or Macro to find and move to new line -

i need help linking images right item. need function or macro to: find b2(8552) value in row e , first 1 move in c2 next 1 in new line c3 , a2 re-create new line a3 , repeat until moves on matched values , move next 1 (8553). i'm new excel , if text above not create sense please allow me know , re-explain. have tried post image of excel screen can't bcouse need 10 reputation able post images:(. , sorry broken english.

before

a b c e 1 handle sku sorted_image unsorted_image 2 item-loc-501 8552 8552-image-1 3 item-dox-502 8553 8552-image-2 4 mov-loc-item 8554 8552-image-3 5 222-loc-mov 8555 8553-image-1 6 8553-image-2 7 8554-image-1 8 8554-image-2 9 8554-image-3 10 8554-image-4 11 8555-image-1 12 8555-image-2 13

after

a b c e 1 handle sku sorted_images unsorted_images 2 item-loc-501 8552 8552-image-1 3 item-loc-501 8552-image-2 4 item-loc-501 8552-image-3 5 item-dox-502 8553 8553-image-1 6 item-dox-502 8553-image-2 7 mov-loc-item 8554 8554-image-1 8 mov-loc-item 8554-image-2 9 mov-loc-item 8554-image-3 10 mov-loc-item 8554-image-4 11 222-loc-mov 8555 8555-image-1 12 222-loc-mov 8555-image-2 13

this can performed couple of standard (non-array) formulas using native excel functions.

      

the formula in g2 =index(a:a,match(--left($e2,find("-",$e2)-1),$b:$b,0)). fill right h2 fill g2:h2 downwards necessary. formula in i2 =e2.

these formulas assume excel looking @ true numbers in column b. if skus text numbers, remove double unary (e.g. --) converts text pulled left function real number , leave sku text.

copy paste special, values move info column a:c.

excel vba excel-formula

No comments:

Post a Comment