excel - find ramdomly located value and return value in cell to the left -


i need find multiple randomly located instances of value "windows_group" on worksheet named "data" , return value of cell left of "windows_group" cells worksheet "windows_groups".

the worksheet "data" has data in columns a-g, can have 5000 rows.

thank in advance!

there might more graceful this, brute force way macro loops through cells , uses offset method:

sub findandreturn() 'i'm not @ naming dim cell range dim integer dim k integer k = 1  each cell in worksheets("data").range("b1:g5000") ' i'm assuming has start in column b if want value left      if cell.value = "windows_group"           worksheets("windows_groups").range("a" & k).value = cell.offset(0,-1).value           k=k+1      end if next cell end sub 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -