Anda di halaman 1dari 55

Sample 1

If you use Excel much at your job, sooner or later, youre bound to need to look up values in a table. One of the most useful functions in Excel, called vlookup, does exactly that. The ! in vlookup stands for vertical! and lookup! is pretty self explanatory. This function allo"s you to look up values in a table that are listed in column format #ho" most tables are laid out$, %iven another value #lets call this the key!$. Excel also has a sister function called hlookup #h & hori'ontal$ that can be used to look up values in ro"s. (adly, as most companies seem to rely on Excel as a poor)mans database of sorts #a totally unscalable solution and prone to errors "ith every revision, but dont %et me started$, once you kno" vlookup, its likely to become one of your most often used Excel functions. (o, lets %et started "ith a very simple example of "hat vlookup is all about. (uppose you had the follo"in% table*

+iven a list of names in another part of the table #in this case, column ,$, you "ant to fi%ure out "hat kind of animal it is*

lookups format looks like the follo"in%* =vlookup(lookup value, table where values reside, column # where values are located, false) -ets look at each of these parts a bit closer. The first thin% that %oes into the vlookup function is the thin% you kno" #or are %iven$ and that "ill be used to lookup other values. In this case, you have the names of the animals, so these are the thin%s "e kno". In our example, they reside in column ,, from cells ,. throu%h ,/. If "e "anted to put the type of animal next to the name of the animal in column I #so I. "ould correspond to the name of the animal in ,.$, "e "ould insert the vlookup function there*

and put ,. as the first thin% in our vlookup function*

0ext, "e need to kno" the location of the table "here our values reside. These happen to be from cells 12 throu%h 3/ in this example, "hich "e "ould hi%hli%ht "ith our mouse to insert into the vlookup function. Its very important that you include all the cells in the table. ,i%hli%ht the table "ith your mouse*

1t the same time, the vlookup function automatically puts in the cells youve hi%hli%hted*

0ext, "e need the column number "here the values are located. 1l"ays start "ith the first column #column 1 in this case$ as 42 and count out to the ri%ht. In this example, the type of animal listed is in column ., so thats "hat "e "ould need to insert in the

vlookup function. 0ote that to use vlookup, your keys al"ays have to be to the left of your values. #5ell cover more of this in part II of the tutorial at a later date.$

6inally, the last attribute that vlookup takes is either true! or false!. I happen to al"ays use false!, and "hat this does is force vlookup to return the first exact value it finds. If that value isnt found, then vlookup conks out and returns 4071!. Thou%h "e "ont use it in this example, if you select true!, then rather than al"ays lookin% for the exact value, vlookup "ill return the exact value if it exists, or the closest one to it that doesnt exceed the key. #If you use true!, you "ill need to sort your data in ascendin% order before usin% vlookup.$

(till "ith me8 1%ain, this is "hat "e "ould actually put in cells I. if the names of the animals "e have are located in cells ,. throu%h ,/* =vlookup(H2, 1!"#, 2, false) Once "e close off the parenthesis and hit Enter!, vlookup automatically calculates*

1nd so on. 5e "ould continue do"n each cell in column I that "e needed. One thin% to note is to make sure that the location of your keys and values is al"ays selected correctly. Oftentimes, as you copy)and)paste formulas all around Excel, the location of the data "ill also move around relative to the cell. The easiest "ay to prevent this is to lock! the ran%e of the location9 in this case, "e "ould do so by usin% :1:2*:3:/; instead of 12*3/;. This "ay, as "e move do"n column I, say, to cell I., 12*3/ doesnt become 1.*3< but stays "ith the ori%inal ran%e of data. This "ay, "e can just copy "hats in cell I. do"n the rest of the cells #from I= throu%h I/$*

6inally, heres our result, after makin% the :! chan%es and copyin% and pastin% the formula do"n the rest of the column*

This has been a really simple example of vlookup, and Ill cover a bit more in part II "ith another example, still simple, but "ith sli%htly more data. 1lthou%h in practice, vlookup is usually used bet"een Excel sheets and "orkbooks, once you understand this example #"hich has been done "ithin a sin%le sheet$, usin% vlookup outside the same sheet shouldnt be much harder. -ook for part II soon>

Sample 2
-ast month, I "rote a short and simple example of ho" to use the -OO?@A function in Excel and promised to follo" up "ith a second part. In this post, "ell look at a sli%htly more complicated example and sho" a couple of tips and tricks for makin% -OO?@A "ork correctly. 3y the "ay, Ive received a couple of comments and thanks for my previous post and just "ant to encoura%e readers to let me kno" if there are other examples of functions or situations they face that they need help "ith. They make a %reat source for future posts on this site *$ In our last example, "e had a simple, t"o)column list of names and types of animals. In this post, "ell take a look at a list of employee names and data, say, for calculatin% commissions for sales people. ,eres "hat our data looks like #on all ima%es in this post, click to enlar%e$*

1s you can see, "ere %iven employees last and first names, their base salaries, their bonus percenta%e, and the B of the year that they "ere employees. 5ere also %iven a uniCue identifier in the form of an employee number. -ets examine the data a bit further. 6irst, "hat "e should notice is that there are employees "ith the same last and first names. Theres an 1ndre" 1nderson as "ell as an 1ndre" Dobb. 1nd a Aenny and Eim Fee. Gemember that -OO?@A "ill either return the first match it finds in a list. In this case, if "e "ere to use -OO?@A to lookup a list of last names or first names, -OO?@A "ould al"ays return 1ndre" 1ndersons data #if "e "ere lookin% usin% the 6irst 0ame! field$ or Aennys data #if "e "ere lookin% usin% the -ast 0ame! field$. (o, "hat to do8

In this example, "ere lucky to have a uniCue identifier in the form of Employee 0umber!. Each number is assi%ned only once to the employee, so this field "ould be a safe one to use for -OO?@A. The only problem is that its located all the "ay at the end of the data, to the ri%ht of all the other fields. Gemember that -OO?@A has another criteria* "hatever field youre usin% to look up other data has to be to the left of all the other fields. The easiest "ay to accomplish this is to insert a column to the left of -ast 0ame! #Dolumn 1$ and copy)and)paste the Employee 0umber! column there. ,eres ho" that "ould look, step by step* (tep 2* (elect column 6, "here Employee 0umber! data is located*

(tep .* Gi%ht)click on the mouse*

(tep =* (elect Dopy! from the menu*

1ll of column 6 is no" hi%hli%hted in a dotted line*

(tep H* ,i%hli%ht column 1*

(tep /* Gi%ht)click on the mouse once more*

(tep <* (elect Insert Dopied Dells! on the menu

(tep I* The cells from column 6 are no" copied over to column 1, and everythin% is shifted over one column*

0o", employee numbers appear in both column 1 and +. ,it to %et rid of the hi%hli%ht around column +.

5ere no" %ood to %o> 3y the "ay, if you had not had uniCue identifiers like employee numbers readily available, you could potentially use the DO0D1TE01TE or J! function in Excel to create! uniCue identifiers. DO0D1TE01TE is a function that just mun%es t"o fields to%ether. In this case, creatin% a uniCue identifier out of concatenatin% last name and first name "ould probably "ork. 3ack to the tutorial. (uppose "e had a second sheet that had a list of employee numbers for the four employees "ho had "orked less than 2KKB durin% the year, and "e "anted to calculate their bonuses for the year. 0otice "e s"apped first and last name orders in this sheet and put the employee numbers in a different order*

5e just "ant to fill in the data from the other source #possibly from another Excel sheet or "orkbook$ in order to do the calculation. ,ere, Ive left the ori%inal data in (heet2; and am pullin% the data into (heet.;. 5hat "ould "e put into cell 3. in order to pull the data correctly8 In the example in the last post, "e only had t"o columns of data. In this example, "e have seven, after copyin% over the employee numbers into the first column. 6or the 6irst 0ame! column, "e "ould be pullin% data from column = in our data set #not column ., "hich contains last names$. (o heres "hat the -OO?@A "ould look like for cell 3.* =$%&&'()( 2,Sheet1* 1!+,,-,. %S/) 1nd heres the excel step)by)step*

(tep 2* Insert the -OO?@A function by typin% &vlookup#! in cell 3.*

(tep .* 5ere lookin% up Employee 0umbers, "hich are located in the previous column, so "e put in 1. for cell 3.*

Aut in a ,! after this to move on to the next input for -OO?@A called tableLarray!. (tep =* 0o" "e need to hi%hli%ht the area "here all the data resides*

Aut in a ,! after this to move on to the next input for -OO?@A, called colLindexLnum!. (tep H* Gemember that in this case, "e need to reference column 4=, "here first names are located. 5e al"ays start "ith the lookup value as column 42 and count to"ard the ri%ht.

Aut in a ,! after this to move on to the final input for -OO?@A. (tep /* 6inally, "e "ant to put in false! as the final input into -OO?@A to tell it to look for exact matches.

0o" close off the parenthesis to -OO?@A, and the cell is automatically populated "ith the data "e need.

The key no" is to populate the rest of the cells. Dan you fi%ure out ho" to do this8 One "ay "ould be to %o throu%h each cell and repeat the steps above. 6or example, to populate cell D., "e "ould "rite* =$%&&'()( 2,Sheet1* 1!+,,2,. %S/) and so on, referencin% each column "here the data resides. #(alary! resides in column H, bonus! in column /, etc.$ 1nother "ay "ould be to use Excels anchorin% mechanism so that "e could copy and paste formulas a bit more efficiently. 6or example, for the rest of the cells under 6irst 0ame!, "hat "e could do is "rite the follo"in% instead in 3.* =$%&&'()(0 2,Sheet1*0 01!0+0,,-,. %S/)

5hat puttin% a :! si%n does in front of cell coordinates is to lock! them in place. 3y puttin% :1. instead of 1. in the first input section, "e lock 1! in place #because all our employee numbers are in column 1$ and let the .; chan%e as "e %o do"n the ro". 3y puttin% :1:2*:+:M; instead of 12*+M; as "e ori%inally had, "e lock in the entire 12 to +M cells in place and keep that section locked! no matter "here "e put the formula. If "e then copy the formula do"n to cells 3= throu%h 3/, "e dont have to retype the formula each time. (imilarly, you can copy the formula across each ro", makin% sure to just chan%e each column number so that youre pullin% the ri%ht data. ,eres "hat the finished table "ould look like*

1nd heres "hat the final column, "hich is just the total bonus calculation, "ould look like if "e assumed that bonuses eCualed salary N bonus N B of year "orked*

In this example, "e populated a ne" table in a ne" sheet "ith data from a separate sheet. 3ut keep in mind one of the po"erful thin%s of -OO?@A is that "ith a uniCue identifier such as Employee 0umber!, "hat "e could do is create an entirely ne" table "ith elements from multiple other tables that each contain Employee 0umber!. 6or example, salary information mi%ht be stored in one place, and employee names in another. 3y usin% -OO?@A to lookup employee numbers from each table, "e could create one table that contains all information at once. This has been a pretty len%thy example thats actually covered a lot of different Excel tips, so "ell stop here. If you have any specific Cuestions or examples that you "ouldnt mind sharin% #of course, all data "ould be dis%uised and Id %et your permission first$, Id be happy to ans"er them by creatin% a post "ith your example in the center. Aopularity* /B O8P

http*77""".myonlinetrainin%hub.com7excel).KKI)BE.BMKBQ=)vlookup)formulas) explained

Sample /1cel $%&&'() /1act 2atch .ormulas /1plained


-OO?@A is my favourite Excel 6ormula> It helps me %et analysis and calculations done in minutes that "ould take hours manually. 1nd I find I have the occasion to use it all the time. Interestin%ly theres t"o "ays you can use it but I find that most people kno" one "ay or the other, and only a fe" kno" both. In this article "ere %oin% take a look at the -OO?@A Exact Ratch version of the formula, but first lets set the scene. The other way to do a VLOOKUP is what I call the Sorted List VLOOKUP. In the list belo" "e "ant to calculate a commission in column 6 for each builder. 3ut each builder has a specific commission rate they are entitled to. Thankfully "e have this information in a table to the ri%ht, and this is "here "e %ive -OO?@A the opportunity to strut its stuff.

2icrosoft /1cel describes the $%&&'() formula as! -OO?@A#lookupLvalue, tableLarray, colLindexLnum ,ran%eLlookup$ nd to translate it into /n3lish it would read! -OO?@A#find this value, in that table, return the value in column x of the table, but only return a result if you can match the value exactly$ -ets make it even clearer by applyin% it to our example* -OO?@A#find the name Fou% from cell 3., in the Dommission Gates table ,.*IQ, return the value in column . of the table, but only return a value if you find the exact name Fou% in the Dommission Gates table, other"ise %ive me an error$

.irstl4 let me clarif4 some points! 2$ 56eturn the value in column 2 of the table7 is referrin% to the column number in the table ,.*IQ, not the column number of the spreadsheet. The information "e "ant returned is the percenta%e rate, and it is in the second column of the Dommission Gates table. .$ 5&nl4 return a result if 4ou can match the value e1actl47 is tellin% Excel that "e only "ant information returned if it matches our criteria exactly. i.e. 6ind Fou% in our Dommission Gates Table, and if you cant find Fou%, %ive me an error. The error displayed "ill be 4071. On the other hand, if "e told Excel it "as ok to not find an exact match, it "ould return the next best result. i.e. If Fou% "asnt in our Table Excel "ould return the next best result. In this example "e "ouldnt "ant it to do that, but this option is handy in other situations "hich "ell cover in another tutorial. O?, no" thats clarified, in Excel our -OO?@A formula in column 6 for the above example "ould be* & -OO?@A#3.,:,:.*:I:Q,.,61-(E$ 0ote* 5here S61-(E is tellin% Excel "e "ant it to find an Exact Ratch only. Our Excel table "ould then look like this "ith the -OO?@A formula in column 6*

Toull notice in the formula bar above there are S: si%ns around the reference to the table ,.*IQ. This is called an absolute reference and it allo"s us to Cuickly copy the formula do"n column 6 "ithout Excel dynamically updatin% the table ran%e as "e copy. To understand ho" to use shortcuts like absolute references you can %et our Ricrosoft Office online trainin% here. How can we make this $%&&'() formula even better8 1ssumin% the end result of our example exercise is to actually calculate the commission : amount, "e could make this formula even better by doin% this in one step in column 6. -ets say commission is calculated as Total :k x Dommission B, our formula in cell 6. "ould read* & -OO?@A#3.,:,:.*:I:Q,.,61-(E$NE. 1nd in seconds "e can have hundreds of -OO?@As and calculations done>

$%&&'() 6ules, 9ommon 2istakes and :roubleshootin3* 2$ -OO?@A formulas read from left to ri%ht. Tou must have the information you are lookin% up #in our example Fou% in the Dommission Gates Table$, in a column to the left of the information you "ant returned, in our example the Spercenta%e rate. i.e. it has to %o SFou%, then SB rate. Excel "ouldnt be able to find it if it "ent SB Gate then SFou%. .$ Tou can have as many columns as you like in your Table, just so lon% as you follo" the Sleft to ri%ht rule above. =$ The STable you are lookin% up can be in the same spreadsheet, or a different sheet in the same "orkbook, or in a different "orkbook alto%ether. H$ The table doesnt have to be sorted in any particular order, but you must not have duplicates, unless the information on each duplicate is exactly the same. 6or example, if Fou% appeared t"ice in our Dommission Gates table "ith different percenta%e rates for each instance, Ricrosoft Excel "ould return the rate on the first instance of Fou%. /$ The formula isnt case sensitive, so SFou% could be Sdou% or SFou% in either column 3 or the table. <$ 5hat doesn it mean "hen my -OO?@A returns a 40718 It means Excel cant find the value youre tryin% to look up in your table. If you %et this, but you can Splain as day see its there in the table. Then its likely youve %ot one value formatted as Text

and another formatted as +eneral. To check this %o to each cell youre referencin% and look in the formula bar to see if one is prefixed by an apostrophe S. Tou can only see the apostrophe from the formula bar. (ee example belo". 3asically Excel reads text prefixed "ith an apostrophe as different to text "ithout, even thou%h on the face of the spreadsheet they mi%ht look the same. Tou need to make sure both the value youre lookin% up, and the value in the table either both have the apostrophe, or both dont. The Cuickest "ay to %et rid of the apostrophes is to do SText to Dolumns, but that lesson is for another day.

I$ This formula "orks the same in Ricrosoft Excel .KK=, .KKI and .K2K. The -OO?@A is a fairly basic formula, but its applications are vast, especially "hen you combine it "ith other formulas like I6 statements, (@RI6 and so on. Fo"nload the Excel "orkbook used in this example so you can copy and practice the -OO?@A formula to make sure you really %et it and can take advanta%e of its po"er. Update: The second way to use a VLOOKUP formula is what I call the Sorted List method. Clic here to !o to my tutorial on the VLOOKUP Sorted List "ethod.

Sample 2

,O5)TO 0E5( 6OG@R( +EE?T T)(,IGT( (i%nup ,ome 6eatures

-o%in

Date%ories +et Domputer ,elp

(sin3 $%&&'() in /1cel


-OO?@A is one of Excels most useful functions, and its also one of the least understood. In this article, "e demystify -OO?@A by "ay of a real)life example. 5ell create a usable In#oice Template for a fictitious company. (o "hat is -OO?@A8 5ell, of course its an Excel function. This article "ill assume that the reader already has a passin% understandin% of Excel functions, and can use basic functions such as (@R, 1 EG1+E, and TOF1T. In its most common usa%e, -OO?@A is a data$ase function, meanin% that it "orks "ith database tables U or more simply, lists of thin%s in an Excel "orksheet. 5hat sort of thin%s8 5ell, any sort of thin%. Tou may have a "orksheet that contains a list of employees, or products, or customers, or DFs in your DF collection, or stars in the ni%ht sky. It doesnt really matter. ,eres an example of a list, or database. In this case its a list of products that our fictitious company sells*

@sually lists like this have some sort of uniCue identifier for each item in the list. In this case, the uniCue identifier is in the Item Dode! column. 0ote* 6or the -OO?@A function to "ork "ith a database7list, that list must have a column containin% the uniCue identifier #or key!, or IF!$, and that column must $e the first column in the ta$le. Our sample database above satisfies this criterion. The hardest part of usin% -OO?@A is understandin% exactly "hat its for. (o lets see if "e can %et that clear first*

$%&&'() retrieves information from a database;list based on a supplied instance of the uni<ue identifier= Aut another "ay, if you put the -OO?@A function into a cell and pass it one of the uniCue identifiers from your database, it "ill return you one of the pieces of information associated "ith that uniCue identifier. In the example above, you "ould pass -OO?@A an item code, and it "ould return to you either the correspondin% items description, its price, or its availability #its In stock! Cuantity$. 5hich of these pieces of information "ill it pass you back8 5ell, you %et to decide this "hen youre creatin% the formula. If all you need is one piece of information from the database, it "ould be a lot of trouble to %o to to construct a formula "ith a -OO?@A function in it. Typically you "ould use this sort of functionality in a reusable spreadsheet, such as a template. Each time someone enters a valid item code, the system "ould retrieve all the necessary information about the correspondin% item. -ets create an example of this* 1n In#oice Template that "e can reuse over and over in our fictitious company. 6irst "e start ExcelV

Vand "e create ourselves a blank invoice*

This is ho" its %oin% to "ork* The person usin% the invoice template "ill fill in a series of item codes in column 1!, and the system "ill retrieve each items description and price, "hich "ill be used to calculate the line total for each item #assumin% "e enter a valid Cuantity$. 6or the purposes of keepin% this example simple, "e "ill locate the product database on a separate sheet in the same "orkbook*

In reality, its more likely that the product database "ould be located in a separate "orkbook. It makes little difference to the -OO?@A function, "hich doesnt really care if the database is located on the same sheet, a different sheet, or a completely different "orkbook.

In order to test the -OO?@A formula "ere about to "rite, "e first enter a valid item code into cell 122*

0ext, "e move the active cell to the cell in "hich "e "ant information retrieved from the database by -OO?@A to be stored. Interestin%ly, this is the step that most people %et "ron%. To explain further* 5e are about to create a -OO?@A formula that "ill retrieve the description that corresponds to the item code in cell 122. 5here do "e "ant this description put "hen "e %et it8 In cell 322, of course. (o thats "here "e "rite the -OO?@A formula U in cell 322. (elect cell 322*

5e need to locate the list of all available functions that Excel has to offer, so that "e can choose -OO?@A and %et some assistance in completin% the formula. This is found by first clickin% the .ormulas tab, and then clickin% >nsert .unction*

1 box appears that allo"s us to select any of the functions available in Excel. To find the one "ere lookin% for, "e could type a search term like lookup! #because the function "ere interested in is a loo up function$. The system "ould return us a list of all lookup) related functions in Excel. $%&&'() is the second one in the list. (elect it an click &'V

The .unction r3uments box appears, promptin% us for all the ar!uments #or parameters$ needed in order to complete the -OO?@A function. Tou can think of this box as the function is askin% us the follo"in% Cuestions* 2. %hat uni&ue identifier are you loo in! up in the data$ase' .. %here is the data$ase' =. %hich piece of information from the data$ase( associated with the uni&ue identifier( do you wish to ha#e retrie#ed for you' The first three ar%uments are sho"n in bold, indicatin% that they are mandatory ar%uments #the -OO?@A function is incomplete "ithout them and "ill not return a valid value$. The fourth ar%ument is not bold, meanin% that its optional*

5e "ill complete the ar%uments in order, top to bottom. The first ar%ument "e need to complete is the %ookup?value ar%ument. The function needs us to tell it "here to find the uniCue identifier #the item code in this case$ that it should be retunin% the description of. 5e must select the item code "e entered earlier #in 122$. Dlick on the selector icon to the ri%ht of the first ar%ument*

Then click once on the cell containin% the item code #122$, and press /nter*

The value of 122! is inserted into the first ar%ument. 0o" "e need to enter a value for the :able?arra4 ar%ument. In other "ords, "e need to tell -OO?@A "here to find the database7list. Dlick on the selector icon next to the second ar%ument*

0o" locate the database7list and select the entire list U not includin% the header line. The database is located on a separate "orksheet, so "e first click on that "orksheet tab*

0ext "e select the entire database, not includin% the header line*

Vand press /nter. The ran%e of cells that represents the database #in this case Aroduct Fatabase>1.*FI!$ is entered automatically for us into the second ar%ument. 0o" "e need to enter the third ar%ument, 9ol?inde1?num. 5e use this ar%ument to specify to -OO?@A "hich piece of information from the database, associate "ith our item code in 122, "e "ish to have returned to us. In this particular example, "e "ish to have the items description returned to us. If you look on the database "orksheet, youll notice that the Fescription! column is the second column in the database. This means that "e must enter a value of .! into the 9ol?inde1?num box*

It is important to note that that "e are not enterin% a .! here because the Fescription! column is in the " column on that "orksheet. If the database happened to start in column ' of the "orksheet, "e "ould still enter a .! in this field. 6inally, "e need to decide "hether to enter a value into the final -OO?@A ar%ument, 6an3e?lookup. This ar%ument reCuires either a true or false value, or it should be left blank. 5hen usin% -OO?@A "ith databases #as is true QKB of the time$, then the "ay to decide "hat to put in this ar%ument can be thou%ht of as follo"s* If the first column of the database #the column that contains the uniCue identifiers$ is sorted alphabetically7numerically in ascendin% order, then its possible to enter a value of true into this ar%ument, or leave it blank. If the first column of the database is not sorted, or its sorted in descendin% order, then you must enter a value of false into this ar%ument 1s the first column of our database is not sorted, "e enter false into this ar%ument*

Thats it> 5eve entered all the information reCuired for -OO?@A to return the value "e need. Dlick the &' button and notice that the description correspondin% to item code GQQ.H/! has been correctly entered into cell 322*

The formula that "as created for us looks like this*

If "e enter a different item code into cell 122, "e "ill be%in to see the po"er of the -OO?@A function* The description cell chan%es to match the ne" item code*

5e can perform a similar set of steps to %et the items price returned into cell E22. 0ote that the ne" formula must be created in cell E22. The result "ill look like this*

Vand the formula "ill look like this*

0ote that the only difference bet"een the t"o formulae is the third ar%ument #9ol?inde1?num$ has chan%ed from a .! to a =! #because "e "ant data retrieved from the =rd column in the database$. If "e decided to buy . of these items, "e "ould enter a .! into cell F22. 5e "ould then enter a simple formula into cell 622 to %et the line total* &F22NE22 V"hich looks like thisV

9ompletin3 the >nvoice :emplate


5eve learned a lot about -OO?@A so far. In fact, "eve learned all "ere %oin% to learn in this article. Its important to note that -OO?@A can be used in other circumstances besides databases. This is less common, and may be covered in future ,o")To +eek articles. Our invoice template is not yet complete. In order to complete it, "e "ould do the follo"in%* 2. 5e "ould remove the sample item code from cell 122 and the .! from cell F22. This "ill cause our ne"ly created -OO?@A formulae to display error messa%es*

5e can remedy this by judicious use of Excels >.() and >S"% @'() functions. 5e chan%e our formula from thisV =$%&&'()( 11,7)roduct Aatabase7* 2!AB,2,. %S/) Vto thisV =>.(>S"% @'( 11),CD,$%&&'()( 11,7)roduct Aatabase7* 2!AB,2,. %S/)) .. 5e "ould copy the formulas in cells 322, E22 and 622 do"n to the remainder of the item ro"s of the invoice. 0ote that if "e do this, the resultin% formulas "ill no lon%er correctly refer to the database table. 5e could fix this by chan%in% the cell references for the database to a$solute cell references. 1lternatively U and even better U "e could create a ran!e name for the entire product database #such as Aroducts!$, and use this ran%e name instead of the cell references. The formula "ould chan%e from thisV =>.(>S"% @'( 11),CD,$%&&'()( 11,7)roduct Aatabase7* 2!AB,2,. %S/)) Vto thisV =>.(>S"% @'( 11),CD,$%&&'()( 11,)roducts,2,. %S/)) Vand then copy the formulas do"n to the rest of the invoice item ro"s. =. 5e "ould probably lock! the cells that contain our formulae #or rather unloc the other cells$, and then protect the "orksheet, in order to ensure that our carefully constructed formulae are not accidentally over"ritten "hen someone comes to fill in the invoice. H. 5e "ould save the file as a template, so that it could be reused by everyone in our company If "e "ere feelin% really clever, "e "ould create a database of all our customers in another "orksheet, and then use the customer IF entered in cell 6/ to automatically fill in the customers name and address in cells 3<, 3I and 3M.

If you "ould like to practice "ith -OO?@A, or simply see our resultin% Invoice Template, it can be do"nloaded from here. FonWt sho" a%ain X

AonEt (p3rade to Findows , (ntil Gou 6ead :his "ook*


5indo"s M can be confusin%, but no" you can read our comprehensive %uide that explains everythin% the easy "ay.

There are over a thousand screenshots and pictures in the book to help you %et the han% of navi%atin% around 5indo"s M, and nearly a thousand pa%es of content so thereWs nothin% you "onWt understand. Alus itWs "ritten in the classic ,o")To +eek style youWre familiar "ith.

Dlick ,ere to +et Tour Dopy Today


3y Rark irtue on K=7=K72K

Our +eek Trivia 1pp for

,o" To 3oot Tour 1ndroid

,T+ Explains* Foes Tour

5indo"s M is 0o" 1vailable Every"here 1ds by +oo%le

Ahone or Tablet Into (afe Rode

1ndroid Ahone 0eed an 1ntivirus8

A new Tata Docomo Photon+


for just Rs 750 for your Dell & get benefits worth Rs 2 50
tata!ocomo"com#Dell$ffer

9omments (B#)
2. Rarch =K, .K2K <*.Q am

Favid -evine +reat article> Touve done a %reat job at explainin% this function and ho" to use it. I hope that you %et to "rite a follo")up article to this re%ardin% other uses of -OO?@A. .. Rarch =K, .K2K I*.. am

Eason +ood article. I do have some notes. I use R( Office every day and use several functions in Excel to process, compile and slice data. Gan%e lookup should al"ays be 6alse, unless you specifically need it to be True. 6alse & @niCue alues, True & 1ny that partially match. If you are lookin% for a match on the number 2, 6alse "ill find that value or sho" an error. True "ill look for 2, 22, .2, 222, etc. -eavin% this option blank is the same as True. 6rom the Excel .KK= ,elp 6ile* Gan%eLlookup is a lo%ical value that specifies "hether you "ant -OO?@A to find an exact match or an approximate match. If TG@E or omitted Oread* leave blankP, an approximate match is returned. In other "ords, if an exact match is not found, the next lar%est value that is less than lookupLvalue is returned. If 61-(E, -OO?@A "ill find an exact match. If one is not found, the error value 4071 is returned.

R( Office (ite on lookup* http*77office.microsoft.com7en) us7help7,A2KK<QM=/2K==.aspx 1lso, it is al"ays best to sort your Festination sheet #"hat you are updatin%$ and the (ource (heet #"hat you are pullin% from$ by the same value in ascendin% order. 6or lookup to pull the data into your Festination sheet, you "ill need the look up values on both sheets to be on the left of the data you are populatin% and lookin% for. If the Festination and (ource are in the same "orkbook, you should lock the cells in the vlookup usin% the dollar si%n #:$. ,ere is an example* & -OO?@A#122,Aroduct Fatabase>:1:.*:F:I,.,61-(E$. Dreatin% absolute ran%es #1*F$ or creatin% a ran%e name is an ele%ant "ay of "orkin% a spreadsheet, ho"ever, this can also complicate thin%s "hen you are lookin% to update or chan%e the sheets or processes. To resolve the 4n7a, you can use the I(EGGOG function, "hich "ill address other errors that can come up. Example* &I6#I(EGGOG#122$,!Y, -OO?@A#122,Aroduct Fatabase> :1:.*:F:I,.,61-(E$$. One of the best sources for Excel is Excels ,elp 6ile. 6ormulas are very "ell documented. If only the rest of Office "as detailed like this. =. Rarch =K, .K2K M*H2 am

+re% Toland +ood article but to deal "ith blank entries I often use I6EGGOG as it deals "ith so many different error handlin% conditions. I6EGG is also useful. H. Rarch =K, .K2K Q*KK am

charris i "ork "ith excel all day and "ould say i have above avera%e understandin% but ive never delved into the -OO?@A. that "as an a"esome explanation> time to %et to "ork on my %irlfriends ne" invoices>

/. Rarch =K, .K2K 22*=H am

funkybebel To create a ran%e name #once you have selected the cells$ * just enter the name of it in the ran%e field #at the left of the top formula bar$ To mana%e or delete a ran%e name * DtrlZ6= <. Rarch =K, .K2K 22*H< am

Eason [+re% Toland* ,ad not looked into that before. Eust al"ays used I(EGGOG. http*77office.microsoft.com7en)us7excel7,1K2.=2I</2K==.aspx (yntax I6EGGOG#value,valueLifLerror$ alue is the ar%ument that is checked for an error. alueLifLerror is the value to return if the formula evaluates to an error. The follo"in% error types are evaluated* 4071, 4 1-@E>, 4GE6>, 4FI 7K>, 40@R>, 401RE8, or 40@-->. I. Rarch =K, .K2K 2.*2. pm

1ntoine 0ice comment Eason, I a%ree completely "ith your addendum. I "ant to mention that since I do "ork "ith much more than fe" do'ens invoice records, my tables usually search bet"een fe" thousands to over 2KK KKK records sometimes, I do not select a ran%e as described in the procedure. I did found more useful to select the "hole column instead of a ran%e as in the follo"in% example* & -OO?@A#:122,Aroduct Fatabase>:1*:F,.,61-(E$

I still find that R()Excel is "ron% in selectin% True as a default. The default #or not enterd$ value for the lo%ical condition should be 6alse M. Rarch =K, .K2K H*.I pm

Favid +reat article that I can %ive to my mana%er and he "ould even understand ho" to use the vlookup function. Eust a Cuick tip "hen buildin% a vlookup, especially if you are doin% lots of these and "ritin% the function directly into the formula bar rather than usin% the "i'ard is that "hen referencin% the ran%e to lookup you should al"ays explicitly reference it, i.e. us the :! #& -OO?@A#:122,Aroduct Fatabase> :1.*:F/,.,61-(E$$ 1 very Cuick "ay to insert the :! si%ns is to use the 6H key "hich "ill iterate throu%h the possible options insertin% a :! as needed i.e. 1.*F/ \\ :1:.*:F:/ \\ 1:.*F:/ \\ :1.*:F/ \\ 1.*F/. This also allo"s you to copy the eCuation do"n the sheet "ithout loosin% the proper ran%e to lookup. Q. Rarch =K, .K2K /*2K pm

(anto Excellent article>> I look for"ard more such articles based on Excel. This is the application that I use on daily basis. 2K. Rarch =2, .K2K 2.*HH am

Fuane Eust an 6TI for anyone, this also "orks in OpenOffice #at least version =.., I havent tested any earlier versions$.

22. 1pril /, .K2K <*.I pm

Goi -O-]> Tou mispelled Gefri%erator!. There is no SF>>> 2.. 1pril /, .K2K M*=M pm

Rark irtue I "as "onderin% if anyone "ould pick that upV 2=. 1pril M, .K2K 2*/. am

senton%oroney does anyone have an idea of ho" to use this function to Cuery an external database like mysCl usin% open office instead of ms excel 2H. 1pril M, .K2K <*=K am

Rark irtue Tou can open remote Ry(^- databases in Excel usin% Ry(^-s OF3D connector. Im not sure if OpenOffice allo"s OF3D connections. Im sure it "ould be easy enou%h to find out. 2/. 1pril M, .K2K 2K*H2 am

scarlet

+GE1T 1GTID-E U "ith this article you have also %ot me more interested in this ho" to "ebsite. I have never actually read anythin% here but continue to %et it in my email. I m takin% excel in school ri%ht no" and this "as so "ell "ritten U you didnt lose me once and am lookin% for"ard to more excel articles. It is such a %reat pro%ram and so mandatory in business U I think a lot of people "ould benefit from more excel articles. I just look at the skinny microsoft book for my class and "hile I am learnin% the pro%ram often think that this book does not cover everythin%. I "ant more> Thank you> 2<. Eune .H, .K2K /*H< am

raduromania +reat 3ut for the item codes "e can use data validation in order to pick 2 item #"e "ant$ from the column 1 U usin% a ruler menu. (elect the column 1 #"ithout column head U item codes!$ and %ive it a name #"ithoutspacesandblanks>>>>>> e% itemcode$ then)\data validation)\list and tap 6= and pick itemcode _all these in 122 _\ a cool ruler appears "ith the list of all item codes from column 1 2I. Eune ./, .K2K Q*H< am

Elise D Its about time (OREO0E explained this function in an idiot proof! "ay> 6I01--T, I can use it and better yet, I understand it> Thank you, Thank you 2M. 1u%ust 2I, .K2K .*H2 am

]oe Thank you so very much for %reat explanation. I "as "onderin% if anyone could help me "ith my latest problem. I am tryin% to mer%e . lists. The problem is that the uniCue identifier in the second list is linked to . or more pieces of information #these are on seperate ro"s$. (o the -OO?@A formula is just pickin% up on the

first ro" "here the number appears and is missin% the rest. Fo you kno" ho" I could modify the formula to catch this information U thanks very much a%ain. 2Q. 1u%ust 2M, .K2K <*/2 pm

ranjit rai 1"esome>>> Thank you so much for this %reat explanation.I kne" nothin% about vlookup but no" "ith this %reat article and the "ay you put it across,it seems its time to impress my team mates and %et promotion.Its never been a %ood explanation before,#not even my kinter%arten teacher$than this. 1 small reCuest to you my friend ,let me kno" more functions and uses of vlookup.I 5O@-F +GE1T-T 1AAGEDI1TE TO@G ,E-A. -ookin% for"ard for more on the same subject.Thanks a million to you .K. 1u%ust ./, .K2K 2.*.H pm

Eanet ery useful and detail >> 0ice>> .2. (eptember Q, .K2K Q*.K am

+. all sounds %reat but I run into the problem "ith copyin% the file to a ne" location and the -OO?@A that I have reference chan%es to the ne" directory V ho" do I lock the directory look up 888 ori%inal location & -OO?@A#1M,A*`Time (heet Rasters`OEobDodeRaster.xlsPEobRaster> 1=*3=MH,.,61-(E$ %ets chan%ed to & -OO?@A#1M,A*`5eekly Time (heet`OEobDodeRaster.xlsPEobRaster> 1=*3=MH,.,61-(E$

I dont "ant to have to copy the EobDodeRaster.xls to every "eekly folder or mistakes are sure to be created. The "orkbook is locked and protected and the link still %ets chan%ed, any ideas ho" to correct this 888 Thanks in advance V

9omments are closed on this post=


If youWd like to continue the discussion on this topic, you can do so at our forum. +o to the 6orum

Aail4 /mail (pdates


Tou can %et our ho")to articles in your inbox each day for free. Eust enter your email belo"*

Email*

2eet the uthor 5eb..K pro%rammer by day, sin%er by ni%ht, 1ussie %eek Rark irtue keeps the ,o")To +eek fla% flyin% Fo"n @nder.

Gecent 1rticles

Our +eek Trivia 1pp for 5indo"s M is 0o" 1vailable Every"here Talk 1bout OER ender Drap"are Overkill> O,umorous Ima%eP Inside the Gaspberry Ai 6actory H 1lternatives to +oo%le Frive for -inux +eek Domic for Fecember Hth U (udden Inspiration

Gelated 1rticles

-OO?@A in Excel, part .* @sin% -OO?@A "ithout a database Rake Excel .KKI Arint +ridlines In 5orkbook 6ile Rake Excel .KKI 1l"ays (ave in Excel .KK= 6ormat Donvert Older Excel Focuments to Excel .KKI 6ormat Import Ricrosoft 1ccess Fata Into Excel

9ate3ories

5indo"s I 5indo"s M 5indo"s ista 5indo"s XA Ral"are J iruses Ricrosoft Office 5eb 3ro"sin% -inux Fesktop 6un 1rchived OtherV

+ettin3 Started

,o" to +et Domputer ,elp 6eature 1rticles +et ,elp on our 6orums 0e"s Tools+eek O@seful Online ToolsP Dookin% 5iki

bout HowH:o +eek


1bout @s Dontact @s 1dvertisin% Arivacy Aolicy Fisclaimers Domment Aolicy 5rite for ,o")To +eek

Fhat >s :hat )rocess8


svchost.exe jusched.exe d"m.exe ctfmon.exe "mpnet"k.exe mF0(Gesponder.exe Fpupdchk.exe "mpnscf%.exe rundll=..exe "fcrun=..exe Ipoint.exe Itype.exe "lidsvc.exe 5fica=..exe

1dobeL@pdater.exe (earchIndexer.exe

Robsync.exe conhost.exe

+et &ur "ook

Dopyri%ht a .KK<).K2. ,o"To+eek.com. 1ll Gi%hts Geserved.

Anda mungkin juga menyukai