Is the name in columnG or in columnI or can it be either. I assume it can't be in columnH as that is the one that you are looking in.
I would envisage something like
For each cell in G3:G40
If cell.value = Value then
value for export = cell.offset(0,1).value
Obviously you will need to code this properly defining variables, ranges etc and would need a similar search through columnI if necessary with an appropriate offset to get the data you want.