Macro: Find - Match - Return Value

PoorFrog

New Member
Joined
Jan 9, 2020
Messages
11
Office Version
  1. 2019
Platform
  1. Windows
Hi everyone,

Here is an extract of my database. In the "Score" sheet we have different columns from which I have to find specific words to match with those from "Data" sheet.
I would like to create a macro :
If there is more than 1 Instr in columns C, G, K and O then columns S, T, U and V are forced to "00" (knowing that in original database we have 100 instruments)
If in Score there is an empty cell then returns "00" in the desired column from S to V.
If in Score cell not is empty then find match in "Data" and return "Data" value in the desired column from S to V.
Score_Ref is a concatenate function.
Attached a Image of the tables.
Thanks for your help.
PF

Find_Match_Return-Value.gif
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

PoorFrog

New Member
Joined
Jan 9, 2020
Messages
11
Office Version
  1. 2019
Platform
  1. Windows
Hi everyone,

If it wasn't in vba I would write something like that:

Count = 0
nb_instr = 0
While Count<2
If(not(isEmpty(cell(row,3 + nb_instr x 4))):
Count+ =1
nb_instr+ = 1
If Count ==2
Instr_Ref = 0

Elif Count ==1
Instr_Ref = ....

Else
Error
 

Watch MrExcel Video

Forum statistics

Threads
1,127,730
Messages
5,626,559
Members
416,190
Latest member
plee3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top