Formula

xxsalahxx

Active Member
Joined
Jun 25, 2011
Messages
316
Office Version
  1. 2007
Hello I have a spreadsheet which has quite a lot of data in it .

I would like it to be able when adding WD 1, WD 2, WD 3, WD 4 into column A that Column B auto populates to say Medical and for Column C to say Medicine is this possible?
and WD 5 WD 6 WD 7 to say Surgical in column B and Surgery in column C

Is this possible?
Thanking you in advance for any help is much appreciated.



InputOutPutOutPut1
Ward 1MedicalMedicine
Ward 2MedicalMedicine
Ward 2MedicalMedicine
Ward 3MedicalMedicine
Ward 4MedicalMedicine
Ward 4MedicalMedicine
Ward 5SurgicalSurgery
Ward 6SurgicalSurgery
Ward 7SurgicalSurgery
 
Hello
Sorry for asking again, im just wondering if i can expand more as I have a ward that is named Ward15a and ward 15b and also one that is names Acute Medical, the formula is not picking up if i have a letter after the ward number and also if its text only.
Is there a way around this?
working with excel 2007

Thanking you in advance
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Try with helper table

Book2
ABCDEFGHIJ
1InputOutPutOutPut1InputOutPutOutPut1
2Ward 1MedicalMedicineWard 1MedicalMedicine
3Ward 2MedicalMedicineWard 2MedicalMedicine
4Ward 2MedicalMedicineWard 3MedicalMedicine
5Ward 3MedicalMedicineWard 4MedicalMedicine
6Ward 4MedicalMedicineWard 5SurgicalSurgery
7Ward 4MedicalMedicineWard 6SurgicalSurgery
8Ward 5SurgicalSurgeryWard 7SurgicalSurgery
9Ward 6SurgicalSurgeryWard15a MedicalSurgery
10Ward 7SurgicalSurgery
11Ward15a MedicalSurgery
12
13
Sheet1
Cell Formulas
RangeFormula
B2:B11B2=VLOOKUP($A2,$G$1:$I$9,2,0)
C2:C11C2=VLOOKUP($A2,$G$1:$I$9,3,0)
 
Upvote 0
Please post some accurate data of what you have & what you want.
 
Upvote 0
Please see below of what I have but i have thousands of rows of data.
The formula I have is working fine until I reach Ward 15a, Ward 15b and anything that only has text such as acute medical. What im looking for is when someone enters Ward 1 the next column updates to Medical and the columns after that updates to Medicine. The same for ward 15a and 15b and acute medical. any help is appreciated.


InputOutPutOutPut1
Ward 1MedicalMedicine
Ward 2MedicalMedicine
Ward 2MedicalMedicine
Ward 3MedicalMedicine
Ward 4MedicalMedicine
Ward 4MedicalMedicine
Ward 5SurgicalSurgery
Ward 6SurgicalSurgery
Ward 15aSurgicalSurgery
Ward 15bSurgicalSurgery
Acute MedicalMedicalMedicine
 
Upvote 0
Why not use use vlookup to lookup the input & compare to the data you just posted.
 
Upvote 0
Solution
I will give this a try never used vlookup before so quite a novice here, I will let you know how i get on with that. thank you
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,341
Messages
6,124,391
Members
449,155
Latest member
ravioli44

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