cancel
Showing results for 
Search instead for 
Did you mean: 

Search excel cell value

NiteshGoyal
Level 3
I have a excel with around 500 rows. Columns are not fixed one can have 1, 10. Cell value can be anywhere in the excel. I want to get a value of cell adjacent to some text value. Cell No Value O30 Customer Type P30 C123456 So I need to search "Customer Type" and then want to retrieve value "C123456" Please suggest a way to do this.
10 REPLIES 10

Anonymous
Not applicable
Hi nitesh.b.goyal, You have two choices how to proceed. 1)You can build this with MS Excel VBO - it will have all the necessary Actions to deal with your task (such as go to next cell,Go to next empty cell,copy,etc..). 2)You can create a code stage to deal with this (performance wise this would be faster)

matthias_vander
Level 2
Hi Nitesh, I am using the same functionality and I split it up in two phases: 1) 'find cell based on value' in the MS excel VBO 2) I created a function myself withing the MS excel VBO called 'Offset Active Cell', based on some code: Dim Instance As Object = GetInstance(handle) Instance.ActiveCell.offset(Row_Offset,Column_Offset).activate In the inputs, you need handle (number), workbook (text), Row offset & Column offset. Make sure you also have data items for all these data I hope this helps

CynthiaLibby
Level 3
I don't have 'find cell based on value' in my MS excel VBO. Where did you get that? Sounds pretty useful.

NiteshGoyal
Level 3
I am also not able to find the 'find cell based on value' in my MS excel VBO. Please tell where I can find? ?

Hi Matthiasvg, I am not able to find the 'find cell based on value' in my MS excel VBO. Please tell where I can find?

matthias_vander
Level 2
You can use this code to create that function. It will look for the value and activate it: Dim wb As Object wb = GetWorkbook(Handle, Workbook) wb.activesheet.Cells.Find(What:=Cell_value).Activate You need the handle, workbook and cell value as inputs

Vijaya_KumarA
Level 3
@Matthiasvg i have tried the above code but it shows the below error: Internal : Could not execute code stage because exception thrown by code stage: The given key was not present in the dictionary. Could please guide me how to proceed writing the code in an new object studio as we use in Excel VBA to intract with excel.

@Matthiasvg i have tried the above code but it shows the below error: Internal : Could not execute code stage because exception thrown by code stage: The given key was not present in the dictionary. Could please guide me how to proceed writing the code in an new object studio as we use in Excel VBA to intract with excel.

Works great! thanks for the share!