grouping specific words under a category

MMGOLD

New Member
Joined
Sep 25, 2018
Messages
2
hi there, how can i make certain words fall automatically under a category.
for example i have spoon, fork, knife, plate, bowl, saucer, i want the first 3 to always specify cutlery in their next column and the last 3 to always specify dishes in their next column any time they are typed the next column should automatically fill the category they belong.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. The macro assumes that you will be entering the data in column A returning the result in column B. Type a value in column A and exit the cell.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
    Select Case Target.Value
        Case "spoon", "fork", "knife"
            Target.Offset(0, 1) = "cutlery"
        Case "plate", "bowl", "saucer"
            Target.Offset(0, 1) = "dishes"
    End Select
End Sub
 
Upvote 0
=IF(F11="benue","nc",IF(F11="kogi","nc",IF(F11="gombe","ne",IF(F11="nasarawa","nc",IF(F11="kwara","nc",IF(F11="niger","nc",IF(F11="plateau","nc",IF(F11="fct","nc",IF(F11="adamawa","ne",IF(F11="bauchi","ne",IF(F11="borno","ne",IF(F11="taraba","ne",IF(F11="yobe","ne",IF(F11="jigawa","nw",IF(F11="kaduna","nw",IF(F11="kano","nw",IF(F11="kebbi","nw",IF(F11="katsina","nw",IF(F11="sokoto","nw",IF(F11="zamfara","nw",IF(F11="abia","se",IF(F11="anambara","se",IF(F11="eboyin","se",IF(F11="enugu","se",IF(F11="imo","se",IF(F11="akwaibom","ss",IF(F11="crossriver","ss",IF(F11="bayelsa","ss",IF(F11="rivers","ss",IF(F11="delta","ss",IF(F11="edo","ss",IF(F11="ekiti","sw",IF(F11="lagos","sw",IF(F11="ogun","sw",IF(F11="ondo","sw",IF(F11="osun","sw",IF(F11="oyo","sw","Poor")))))))))))))))))))))))))))))))))))))
 
Upvote 0
Just posting a formula doesn't tell me much without an explanation. Please clarify in detail.
 
Upvote 0
You can build that formula like
=IF(OR(F11={"benue","kogi","nasarawa"}),"nc",IF(OR(F11={"gombe","adamawa","borno"}),"ne","poor"))
 
Upvote 0
If you meant to use a nested if formula, you can use this:

Code:
=IF(OR(A1="spoon",A1="fork",A1="knife"),"cutlery",IF(OR(A1="plate",A1="bowl",A1="saucer"),"dishes"))

I already tested it, so it should work.

=IF(F11="benue","nc",IF(F11="kogi","nc",IF(F11="gombe","ne",IF(F11="nasarawa","nc",IF(F11="kwara","nc",IF(F11="niger","nc",IF(F11="plateau","nc",IF(F11="fct","nc",IF(F11="adamawa","ne",IF(F11="bauchi","ne",IF(F11="borno","ne",IF(F11="taraba","ne",IF(F11="yobe","ne",IF(F11="jigawa","nw",IF(F11="kaduna","nw",IF(F11="kano","nw",IF(F11="kebbi","nw",IF(F11="katsina","nw",IF(F11="sokoto","nw",IF(F11="zamfara","nw",IF(F11="abia","se",IF(F11="anambara","se",IF(F11="eboyin","se",IF(F11="enugu","se",IF(F11="imo","se",IF(F11="akwaibom","ss",IF(F11="crossriver","ss",IF(F11="bayelsa","ss",IF(F11="rivers","ss",IF(F11="delta","ss",IF(F11="edo","ss",IF(F11="ekiti","sw",IF(F11="lagos","sw",IF(F11="ogun","sw",IF(F11="ondo","sw",IF(F11="osun","sw",IF(F11="oyo","sw","Poor")))))))))))))))))))))))))))))))))))))
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,270
Members
452,628
Latest member
dd2

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