Formula based on First 2 letter of a word

Suresh Kusunuri

Board Regular
Joined
Dec 28, 2007
Messages
138
Office Version
  1. 2007
Platform
  1. Windows
Dear All,

I required a formula for 3rd column of Table 2 based on Table 1
Required "Variety" based on first 2 letters (In RED) of Item code. I am attaching herewith a screenshot.

Kindly advise required formula.
Thanks
Suresh
Table.JPG
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Dear Mr. Suresh,

Could you share a little more detail as to what exactly it is that you require. I am guessing the item column contains GST numbers and the first two digits are the State Code. So based on that you wish to return the variety from Table 1. The problem is that the variety is not unique and may contain many combinations with Code. I would be great if you explain a little more about your requirement.

Thanks!
 
Upvote 0
Thank you Mr. Sangeet, Your assumption is correct. Since, this Forum is for Universal, that's why I was not mentioned GST etc., As per amendments they introduced UTGST. Earlier only Intrastate(only one state) and Interstate(other states) are in the GST calculations. Now, they added UT (only 9 states. separated from other stated category). I required based on the state code, find the % of Tax and calculate amount. Earlier, I used this formula =IF(ISNUMBER(LEFT(F5,2)*1),IF(LEFT(F5,2)="36","Intra State","Inter State"),"Individual") for (in the formula F5 is GST numbers) Interstate, Intrastate and Individual (does not have GST No.). I think I explained the problem properly. Please advise necessary formula for the all calculation of GST.
Thanks once again
Suresh
 
Upvote 0
Hi, Viewers,

I am trying to create a formula with help of our respectable members as follows:
I am giving the above example data in different way.
Please help me to get the result.
I am attaching screenshot here.
Thanks
Suresh
Lookup.PNG
 
Upvote 0
How about
=vlookup(left(c15,2),c3:d12,2,0)
 
Upvote 0
I am guessing they are numbers, so try

=VLOOKUP(LEFT(RIGHT("00"&C15,15),2)+0,C3:D12,2,0
 
Upvote 0
It looks like you want to add 0 to those codes that only have 1 number at the beginning, try

=VLOOKUP(LEFT(RIGHT("0"&C15,15),2)+0,C3:D12,2,0)

1594561193891.png
 
Upvote 0
We could help you if you provided information that we could use; see forum's XL2BB.
The characters in C15 are text; consequently, left 2 characters are text.
The Lookup table information must be consistent therefore the left column of the lookup table must be text.
The 3rd column of the Lookup table yields the rate if that is what you actually require.


try the following

T202007a.xlsm
ABCDEF
1
2UT6%
3
4Rate
501UT4%
604UT5%
707UT6%
8
9
10
11
12
13
14
1507ABC
1ddd
Cell Formulas
RangeFormula
B2B2=VLOOKUP(LEFT(C15,2),D5:F7,2,0)
C2C2=VLOOKUP(LEFT(C15,2),D5:F7,3,0)
 
Upvote 0

Forum statistics

Threads
1,214,798
Messages
6,121,630
Members
449,041
Latest member
Postman24

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