Monitoring cell content & data validation

KoE

Board Regular
Joined
Dec 6, 2004
Messages
51
Greetings,

I'm reading J.Walkenbach's Excel 2007 PP with VBA on monitoring a range to validate data entry but could not make a sense to help me with this lil' problem :)

I've multiple worksheets in which column D contains text string (post, location & grade) & column E contains the corresponding grade only. Data entry into col E is "restricted" by means of dropdown list (from another worksheet named DropDownList). Sample of data in those worksheets is as below:
Excel Workbook
DE
1TempatGred
2Timbalan Pendakwa Raya Unit Pendakwaan Negeri Melaka (Mahkamah Sesyen Melaka) Gred L41L41
3Timbalan Pendakwa Raya Unit Pendakwaan Negeri Melaka (Mahkamah Sesyen Melaka) Gred L41 (Kontrak)L41 (K)
Sheet


and the dropdown list/range labelled Gred which is in a worksheet named DropDownList is as below:
Excel Workbook
J
1L41 (K)
2L41
3L44 (M)
4L44
5L48 (M)
6L48
7L52 (M)
8L52
9L54 (M)
10L54
Sheet


I'm using dropdown in E currently to save time & minimise typing error as at times other people will be updating these data (not to mention that this is the only step so far that i know LOL) ;)

Q:

How could I have cells in column E compare/reflect the grade in column D?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Tricky. If there were a hard and fast rule you could use a formul to extract it, but how for instance do you know that the second one uses just K from the text?
 
Upvote 0
xld,

in the sample, cell E3 [L41 (K)] is actually an abbreviation from part of the text string in cell D3 [L41 (Kontrak)].

At the moment, there are only instances of L41 and L41 (Kontrak) in all cells in column D. However, soon there will be L44 (Memangku), L48 (Memangku), L52 (Memangku) and L54 (Memangku) in column D across multiple worksheet that need to be converted to L44 (M)...L54 (M) respectively.

The string in col D is "controlled" such that they will always have Gred Lxx or Gred Lxx (Kontrak) or Gred Lxx (Memangku) at the end of the string.
 
Upvote 0
This might work for you

=MID(D2,SEARCH("Gred ",D2)+5,SEARCH(" ",D2,SEARCH("Gred ",D2))-SEARCH("Gred ",D2)-1)&
IF(ISNUMBER(SEARCH("(",D2,SEARCH(" ",D2,SEARCH("Gred ",D2))+1)),MID(D2,SEARCH("(",D2,SEARCH(" ",D2,SEARCH("Gred ",D2))+1),2)&")","")
 
Upvote 0

Forum statistics

Threads
1,215,515
Messages
6,125,279
Members
449,220
Latest member
Excel Master

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