Macro for look up required.

chippymark

Board Regular
Joined
Aug 2, 2007
Messages
50
Not sure if any one can help but I am in need of a macro / formula to help achieve the following:

in cells c2 > c20 I have various names
in cells c3? c20 I have a number below each name.

These names all appear in colum A5 > A25

Now what I would like is if in C3 i have the figure 10 I want to look for the same name in Column A and have 10 crosses in the corresponding row.

Hope I am makeing sense ?

so if C2 = Mark & C3 = 5 then A5 (which is Mark) would have and 'X' in B5, C5, D5, E5, F5

Many thanks is advance

Mark
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Not sure I worded correcly see below see if this helps as an example:

Mark Fred John Pete
5 2 7 1


Mark x x x x x
Fred x x
John x x x x x x x
Pete x
 
Last edited:
Upvote 0
Assuming that
1) the names Mark, F, J and P are in the ranges C2:F2, and ALSO in A5:A8
2) the numbers 5, 2, 7, 1 are in the range C3:F3
3) it is POSSIBLE that there may be names in A5:A8 that do not appear in C2:F2

In B5
Code:
=IF(ISERROR(HLOOKUP($A5,$C$2:$F$3,2,0)),"",
IF(HLOOKUP($A5,$C$2:$F$3,2,0)>0,"X",""))

In C5
Code:
=IF(ISERROR(HLOOKUP($A5,$C$2:$F$3,2,0)),"",
IF(HLOOKUP($A5,$C$2:$F$3,2,0)>COUNTIF($B5:B5,"X"),"X",""))
Copy this formula as far to the right as necessary.

Then copy both formulas down as far as necessary.
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,904
Members
452,948
Latest member
Dupuhini

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
Back
Top