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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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