I need help converting this statement into an excel formula: If I have a name in one worksheet and I want to look up the name in another worksheet to find out a certain code and based on that code, I want to do a calculation it it is blank and if it's not I want a 0. For example: Worksheet 1 contains a list of names and hourly rates. Worksheet 2 contains names and codes. If I start with worksheet1,A1 and get the name ADAMS and match the same name somewhere in column A on worksheet2. On worksheet 2 is a code. If it is blank, then I want to multiply the hourly rate on worksheet 1 for ADAMS by 40 else I to return a 0. Thank you in advance.
Try this: =IF(VLOOKUP(A1,Sheet2!A$1:B$10,2,0)="",B1*40,0) -- Biff Microsoft Excel MVP "rj shoe" <rj shoe@discussions.microsoft.com> wrote in message news:E7E122A9-94D3-4F6C-A327-6BBB0BBD3D36@microsoft.com... >I need help converting this statement into an excel formula: > If I have a name in one worksheet and I want to look up the name in > another > worksheet to find out a certain code and based on that code, I want to do > a > calculation it it is blank and if it's not I want a 0. > > For example: Worksheet 1 contains a list of names and hourly rates. > Worksheet 2 contains names and codes. If I start with worksheet1,A1 and > get > the name ADAMS and match the same name somewhere in column A on > worksheet2. > On worksheet 2 is a code. If it is blank, then I want to multiply the > hourly > rate on worksheet 1 for ADAMS by 40 else I to return a 0. > > Thank you in advance.
You are a wonder!!! It works. Thank you VERY MUCH! "T. Valko" wrote: > Try this: > > =IF(VLOOKUP(A1,Sheet2!A$1:B$10,2,0)="",B1*40,0) > > -- > Biff > Microsoft Excel MVP > > > "rj shoe" <rj shoe@discussions.microsoft.com> wrote in message > news:E7E122A9-94D3-4F6C-A327-6BBB0BBD3D36@microsoft.com... > >I need help converting this statement into an excel formula: > > If I have a name in one worksheet and I want to look up the name in > > another > > worksheet to find out a certain code and based on that code, I want to do > > a > > calculation it it is blank and if it's not I want a 0. > > > > For example: Worksheet 1 contains a list of names and hourly rates. > > Worksheet 2 contains names and codes. If I start with worksheet1,A1 and > > get > > the name ADAMS and match the same name somewhere in column A on > > worksheet2. > > On worksheet 2 is a code. If it is blank, then I want to multiply the > > hourly > > rate on worksheet 1 for ADAMS by 40 else I to return a 0. > > > > Thank you in advance. > > >
You're welcome. Thanks for the feedback! -- Biff Microsoft Excel MVP "rj shoe" wrote in message news:CE3A0CC8-F223-488D-8B3D-75AAF3D8C5A6@microsoft.com... > You are a wonder!!! It works. Thank you VERY MUCH! > > "T. Valko" wrote: > >> Try this: >> >> =IF(VLOOKUP(A1,Sheet2!A$1:B$10,2,0)="",B1*40,0) >> >> -- >> Biff >> Microsoft Excel MVP >> >> >> "rj shoe" <rj shoe@discussions.microsoft.com> wrote in message >> news:E7E122A9-94D3-4F6C-A327-6BBB0BBD3D36@microsoft.com... >> >I need help converting this statement into an excel formula: >> > If I have a name in one worksheet and I want to look up the name in >> > another >> > worksheet to find out a certain code and based on that code, I want to >> > do >> > a >> > calculation it it is blank and if it's not I want a 0. >> > >> > For example: Worksheet 1 contains a list of names and hourly rates. >> > Worksheet 2 contains names and codes. If I start with worksheet1,A1 and >> > get >> > the name ADAMS and match the same name somewhere in column A on >> > worksheet2. >> > On worksheet 2 is a code. If it is blank, then I want to multiply the >> > hourly >> > rate on worksheet 1 for ADAMS by 40 else I to return a 0. >> > >> > Thank you in advance. >> >> >>