Need of a Formula

4hoteliers

New Member
Joined
Jan 18, 2016
Messages
44
In a sheet I have in Column A, the travel agent name. In column B should have the type of the company. How can i create a formula that will add in column B the type of the company.
Trying to use the if but no luck.
The column A have these 10 names (Hotelbeds, Gta, Welcomebeds, Hotusa, Webbeds, Sunhotels, Booking, Expedia, Agoda).
In column B should have their types which are:
Hotelbeds, Gta, Welcomebeds, Hotusa, Webbeds, Sunhotels = WEB TO
Booking, Expedia, Agoda = IDS
Thank you very much for your help
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
please supply some sample data showing what is in column A and what should appear in column B for each row
Here is the site tool to upload worksheet data
 
Upvote 0
please supply some sample data showing what is in column A and what should appear in column B for each row
Here is the site tool to upload worksheet data
Segment is in Column A and Client is in Column B. In Column C ned to have a formula that will permit me to check if the Client is associated correctly with Segment

SegmentClient
WEB TOHOTELBEDS
IDSEXPEDIA
IDSBOOKING
WEB TOHOTELBEDS
IDSBOOKING
IDSEXPEDIA
IDSEXPEDIA
IDSAGODA
IDSBOOKING
WEB TOGTA
IDSBOOKING
IDSBOOKING
WEB TOGTA
 
Upvote 0
Is there only ONE segment associated with each Client?
 
Upvote 0
Here is one way

The formula in column C looks up the table (in columns G:H) to see if values in column A are correct
=VLOOKUP(B2,$G$2:$H$100,2,0)=A2

The formula in column D uses looks up the client name in the table and returns segment
=VLOOKUP(B2,$G$2:$H$100,2,0)

The table could be placed in a different sheet
The lookup range is longer than the actual range to allow for more clients to be added later
The lookup range is absolute (does not change when copied down)

Book1
ABCDEFGH
1SegmentClientTESTSEGMENT LOOKUPClientSegment
2WEB TOHOTELBEDSTrueWEB TOAGODAIDS
3IDSEXPEDIATrueIDSBOOKINGIDS
4IDSBOOKINGTrueIDSEXPEDIAIDS
5WEB TOHOTELBEDSTrueWEB TOGTAWEB TO
6IDSBOOKINGTrueIDSHOTELBEDSWEB TO
7IDSEXPEDIATrueIDS
8IDSEXPEDIATrueIDS
9IDSAGODATrueIDS
10IDSBOOKINGTrueIDS
11WEB TOGTATrueWEB TO
12IDSBOOKINGTrueIDS
13IDSBOOKINGTrueIDS
14IDSGTAFalseWEB TO
Sheet3
Cell Formulas
RangeFormula
C2:C14C2=VLOOKUP(B2,$G$2:$H$100,2,0)=A2
D2:D14D2=VLOOKUP(B2,$G$2:$H$100,2,0)
 
Upvote 0
Solution
Here is one way

The formula in column C looks up the table (in columns G:H) to see if values in column A are correct
=VLOOKUP(B2,$G$2:$H$100,2,0)=A2

The formula in column D uses looks up the client name in the table and returns segment
=VLOOKUP(B2,$G$2:$H$100,2,0)

The table could be placed in a different sheet
The lookup range is longer than the actual range to allow for more clients to be added later
The lookup range is absolute (does not change when copied down)

Book1
ABCDEFGH
1SegmentClientTESTSEGMENT LOOKUPClientSegment
2WEB TOHOTELBEDSTrueWEB TOAGODAIDS
3IDSEXPEDIATrueIDSBOOKINGIDS
4IDSBOOKINGTrueIDSEXPEDIAIDS
5WEB TOHOTELBEDSTrueWEB TOGTAWEB TO
6IDSBOOKINGTrueIDSHOTELBEDSWEB TO
7IDSEXPEDIATrueIDS
8IDSEXPEDIATrueIDS
9IDSAGODATrueIDS
10IDSBOOKINGTrueIDS
11WEB TOGTATrueWEB TO
12IDSBOOKINGTrueIDS
13IDSBOOKINGTrueIDS
14IDSGTAFalseWEB TO
Sheet3
Cell Formulas
RangeFormula
C2:C14C2=VLOOKUP(B2,$G$2:$H$100,2,0)=A2
D2:D14D2=VLOOKUP(B2,$G$2:$H$100,2,0)
Thank you very much. Your suggestion is working perfect!!!
 
Upvote 0

Forum statistics

Threads
1,215,055
Messages
6,122,902
Members
449,097
Latest member
dbomb1414

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