Script: excel search for text in one column that categorizes that text in another column

Swanladye

New Member
Joined
Jun 23, 2015
Messages
2
Hi! I am new to VBA scripting and. I am trying to have excel search for text in one column and categorize that text with a text value in another column. For example, I have column L with the list below

Logical Disk Free Space is low
Center: VC Application Error
Megabytes of Memory is too low
Megabytes of Memory is too low
Available Megabytes of Memory is too low
Logical Disk Free Space is low
Available Megabytes of Memory is too low
Logical Disk Free Space is low
Metric CPU Usage = 91%
WMI is unhealthy

I want to have a script that will search for different text values in column L and return a value in column R.

Column L Column R
Logical Disk Free Space is low = Logical Disk
Center: VC Application Error =
Megabytes of Memory is too low = Memory
Metric CPU Usage = 95% = CPU
Megabytes of Memory is too low = Memory
Available Megabytes of Memory is too low = Memory
Logical Disk Free Space is low = Logical Disk
Available Megabytes of Memory is too low = Memory
Logical Disk Free Space is low = Logical Disk
Metric CPU Usage = 91% = CPU
WMI is unhealthy =

I have played around with the following, but no luck yet:
=LOOKUP(L2, {"CPU","Disk","Memory"}, {"cpu","disk","memory"})
=VLOOKUP(L2, {"CPU","CPU";"Memory","memory";"Logical Disk","disk"},2,0)
 
Last edited:

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Better explanation below. Hi! I am new to VBA scripting and. I am trying to have excel search for text in one column and categorize that text with a text value in another column. For example, I have column L with the list below

Logical Disk Free Space is low
Center: VC Application Error
Megabytes of Memory is too low
Megabytes of Memory is too low
Available Megabytes of Memory is too low
Logical Disk Free Space is low
Available Megabytes of Memory is too low
Logical Disk Free Space is low
Metric CPU Usage = 91%
WMI is unhealthy

I want to have a script that will search for different text values in column L ("Logical Disk", "Memory" "CPU") and return a value in column R.

Column L list ...................................................................Column R
Logical Disk Free Space is low.............................................Logical Disk
Center: VC Application Error...............................................
Megabytes of Memory is too low..........................................Memory
Metric CPU Usage = 95 ......................................................CPU
Megabytes of Memory is too low..........................................Memory
Available Megabytes of Memory is too low.............................Memory
Logical Disk Free Space is...................................................Logical Disk
Available Megabytes of Memory is too low.............................Memory
Logical Disk Free Space is low.............................................Logical Disk
Metric CPU Usage = 91%....................................................CPU
WMI is unhealthy...............................................................

I have played around with the following, but no luck yet:
=LOOKUP(L2, {"CPU","Disk","Memory"}, {"cpu","disk","memory"})
=VLOOKUP(L2, {"CPU","CPU";"Memory","memory";"Logical Disk","disk"},2,0)
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,434
Members
448,961
Latest member
nzskater

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