Question about Microsoft Excel for PC

Ad

If you can move your name column (C) to the first column, you could leverage the VLOOKUP formula pretty easily.

To do this, do the following:

1) Move the C Column to be the A Column, shifting all other columns to the right.

2) (optional) Insert a new row at the top of the sheet (to hold the formula & seach value)

3) Use A1 as your search field.

4) In A2, enter the following formula:

=VLOOKUP($A$1,$A$2:$C$6,3,)

Describing above parameters, in the formula:

$A$1 -> the search field (name your looking for).

$A$2:$C$6 -> The table/grid you wish to search and return values from. The left most column (A) must contain the values to be searched.

3 -> is the column number (A=1,B=2,C=3, etc) within the table/grid to return.

If you cannot make the name column your first (A) column, there are more complex ways to do this. For instance, create a new sheet which redisplays the info in the structure easier for this method, and perform the VLOOKUP on that data. Other options might exist in creating a complex formula that would get you what you want.

Also, if you can sort column A (names) it would find results faster, if your data set is large.

Posted on Feb 04, 2008

Ad

Hi there,

Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

Ad

create an additional sheet in worksheet at the bottom of worksheet is a +

add a sheet put each merchandise code in each row going down the column worksheet.

in the next row put the name beside the matching code.

then when finished sort on both columns using the merc, code to sort ascending.

notice in the next picture the addition of $ in the row

this is done to allow you to copy down the formula and leave the reference array the same

look at bottom of spread sheet to see additional sheet being used called code to create the array for the look up. With more array rows just modify the formula to say =lookup(a2,codes!$a$1:$b$200)

lookup will give you a text answer where as vloopup will give a numerical value !

add a sheet put each merchandise code in each row going down the column worksheet.

in the next row put the name beside the matching code.

then when finished sort on both columns using the merc, code to sort ascending.

notice in the next picture the addition of $ in the row

this is done to allow you to copy down the formula and leave the reference array the same

look at bottom of spread sheet to see additional sheet being used called code to create the array for the look up. With more array rows just modify the formula to say =lookup(a2,codes!$a$1:$b$200)

lookup will give you a text answer where as vloopup will give a numerical value !

May 07, 2018 | The Computers & Internet

To have the contents of the cell change from something you input into something else, you would need to put in a macro using VBA. You'll need someone who knows VBA to help with that.

OR... It is a lot easier to get similar results, if you are ok with using a few more cells to do it. The item# will remain where it was entered, and the product name will have to go in a different cell. In that case, you can use a lookup formula.

To do this, lets say your item# is entered in cell 'Sheet1'!C1, and you want the product_name to display in cell 'Sheet1'!D1. On another sheet (lets say sheet2) In cells 'Sheet2'!A1:B5 input the item#'s in the first column (column A1:A5) and input the matching product-names in column B1:B5. This is your lookup data. This sheet can be hidden if you want In cell 'Sheet1'!D1, use a vlookup formula that will look at the item# and find a match in the list, and display the product name for you. =vlookup('Sheet1'!C1,'Sheet2'!$A$1:$B$5,2,false)

This will display N/A# if the number can't be found.

OR... It is a lot easier to get similar results, if you are ok with using a few more cells to do it. The item# will remain where it was entered, and the product name will have to go in a different cell. In that case, you can use a lookup formula.

To do this, lets say your item# is entered in cell 'Sheet1'!C1, and you want the product_name to display in cell 'Sheet1'!D1. On another sheet (lets say sheet2) In cells 'Sheet2'!A1:B5 input the item#'s in the first column (column A1:A5) and input the matching product-names in column B1:B5. This is your lookup data. This sheet can be hidden if you want In cell 'Sheet1'!D1, use a vlookup formula that will look at the item# and find a match in the list, and display the product name for you. =vlookup('Sheet1'!C1,'Sheet2'!$A$1:$B$5,2,false)

This will display N/A# if the number can't be found.

Feb 15, 2013 | Microsoft Excel for PC

I assume your question is regarding Microsoft Excel 2007. You have to use the Lookup Functions to get your data. Use the "VLookup" function to find out info matching the selection if your lookup data (i.e. data in the drop-down) is organized as rows and the linked data is in corresponding columns.

Feb 28, 2011 | Microsoft Office Computers & Internet

Try this:

=LOOKUP(B4,A$1:A$31,A$1:A$31)

=LOOKUP(B4,A$1:A$31,A$1:A$31)

Sep 06, 2009 | Microsoft Office Professional 2007 Full...

Nope, sorry, although I am truly an expert at Excel formulas, I do not understand what you are trying to end up with in the final cell. We can compare a specified field with two spreadsheets - use named ranges and index/match lookup formulas. But then where you really lose me is in reading "a generic field" to find a match, and then placing what "data from another field" into what "other sheet" - ? See the confusion?

Best way to compare 2 given parameters would be to use a nested if formula, with index/match combo. Here is a simple Excel example of how such a formula could be structured:

Sample Data (columnar arangement):

A1: Part B1: Code C1: Price D1: Find Part E1: Find Code

A2: x B2: 11 C2: 5.00 D2: y E2: 12

A3: x B3: 12 C3: 6.00 D3: y E3: 11

A4: y B4: 11 C4: 7.00 D4: x E4: 12

A5: y B5: 12 C5: 8.00 D5: x E5: 11

To retrieve the price for part y with code 12 and return the value to cell F2, type the following formula in cell F2:

=INDEX($C$2:$C$5,MATCH(D2,IF($B$2:$B$5=E2,$A$2:$A$5),0))

Press CTRL+SHIFT+ENTER to enter the formula as an array formula. The formula returns the value 8.00.

To take this one step further, with range names, this example will find one value at a specified location which matches a specific row header value and column header value. Let's say the range is home values (Range=HomeVal), Column A of HomeVal contains street addresses,"row headers" (Range=StAddress), and Row 1 contains dates of the various values that are in the body of the table, "column headers" (Range=Dates). To return the specific value from the range HomeVal to another sheet, where A1=address specified and A2=date specified:

=INDEX(HomeVal,(MATCH($A$1,StAddress,0)),(MATCH($A$2,Dates,0)))

Then make sure to press CTRL+SHIFT+ENTER to enter the formula as an array formula - if you only hit enter, these types of formulas will not work properly.

Please post back if you need further help, with more details, otherwise thank you for using and rating FixYa!

Best way to compare 2 given parameters would be to use a nested if formula, with index/match combo. Here is a simple Excel example of how such a formula could be structured:

Sample Data (columnar arangement):

A1: Part B1: Code C1: Price D1: Find Part E1: Find Code

A2: x B2: 11 C2: 5.00 D2: y E2: 12

A3: x B3: 12 C3: 6.00 D3: y E3: 11

A4: y B4: 11 C4: 7.00 D4: x E4: 12

A5: y B5: 12 C5: 8.00 D5: x E5: 11

To retrieve the price for part y with code 12 and return the value to cell F2, type the following formula in cell F2:

=INDEX($C$2:$C$5,MATCH(D2,IF($B$2:$B$5=E2,$A$2:$A$5),0))

Press CTRL+SHIFT+ENTER to enter the formula as an array formula. The formula returns the value 8.00.

To take this one step further, with range names, this example will find one value at a specified location which matches a specific row header value and column header value. Let's say the range is home values (Range=HomeVal), Column A of HomeVal contains street addresses,"row headers" (Range=StAddress), and Row 1 contains dates of the various values that are in the body of the table, "column headers" (Range=Dates). To return the specific value from the range HomeVal to another sheet, where A1=address specified and A2=date specified:

=INDEX(HomeVal,(MATCH($A$1,StAddress,0)),(MATCH($A$2,Dates,0)))

Then make sure to press CTRL+SHIFT+ENTER to enter the formula as an array formula - if you only hit enter, these types of formulas will not work properly.

Please post back if you need further help, with more details, otherwise thank you for using and rating FixYa!

Jul 08, 2008 | Microsoft Computers & Internet

If a RANGES

\r\nNamed Ranges. SheetLevel Named Range, Named Constants, Named Formulas ,Relative Named Ranges ,Dynamic Named Ranges ,Advanced Dynamic Named Ranges .

\r\nWorking With Ranges. FindLast cell/row/column etc.

\r\nFormula Reference Changer. Absolute to Relative etc.

\r\nSpecialCells Method

\r\nExcel Named Range Manager $

\r\n**OFFSET RANGES VBA**

\r\nReturns a Range object that represents a range that?s offset from the specified range. Read-only.

\r\n*expression.Offset(RowOffset, ColumnOffset)*

\r\n\\"expression\\" is required and should be a Range object.

\r\n

\r\nRowOffset: Optional Variant. The number of rows (positive, negative, or 0 (zero)) by which the range is to be offset. Positive values are offset downward, and negative values are offset upward. The default value is 0.

\r\n

\r\nColumnOffset: Optional Variant. The number of columns (positive, negative, or 0 (zero)) by which the range is to be offset. Positive values are offset to the right, and negative values are offset to the left. The default value is 0.

\r\n

\r\n*Example*

\r\n**Sub OffsetMe()**

\r\n MsgBox Range(\\"B2\\").Offset(RowOffset:=-1, ColumnOffset:=2).Address

\r\n**End Sub**

\r\nIs the SAME as;

\r\n**Sub OffsetMe()**

\r\n MsgBox Range(\\"B2\\").Offset(-1,2).Address

\r\n**End Sub**

\r\n**OFFSET FORMULA**

\r\nReturns a reference to a range that is a specified number of rows and columns from a cell or range of cells. The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and the number of columns to be returned.Syntax = OFFSET(reference,rows,cols,height,width)

\r\n

\r\n*Examples*

\r\n=OFFSET(C3,2,3,1,1) Displays the value in cell F5.

\r\n=OFFSET(C3:E5,0,-3,3,3) Returns an error, because the reference is not valid.\", \"style=\\"background: #FFFFFF;padding: 2px;font-size: 10px;width: 550px;\\"\");" style="FONT-STYLE: italic" onmouseout="GAL_hidepopup();" href="http://www.ozgrid.com/forum/autolink.php?id=5&script=showthread&forumid=8">cell is formatted as Text, then it will display the #### when the text is over the limit. Reformat the cell to General and the text should again show.

Right click on the cell, click Format Cells, under the number tab, choose General.

Also, this ####, will occur is the cell width is to small.

\r\nNamed Ranges. SheetLevel Named Range, Named Constants, Named Formulas ,Relative Named Ranges ,Dynamic Named Ranges ,Advanced Dynamic Named Ranges .

\r\nWorking With Ranges. FindLast cell/row/column etc.

\r\nFormula Reference Changer. Absolute to Relative etc.

\r\nSpecialCells Method

\r\nExcel Named Range Manager $

\r\n

\r\nReturns a Range object that represents a range that?s offset from the specified range. Read-only.

\r\n

\r\n\\"expression\\" is required and should be a Range object.

\r\n

\r\nRowOffset: Optional Variant. The number of rows (positive, negative, or 0 (zero)) by which the range is to be offset. Positive values are offset downward, and negative values are offset upward. The default value is 0.

\r\n

\r\nColumnOffset: Optional Variant. The number of columns (positive, negative, or 0 (zero)) by which the range is to be offset. Positive values are offset to the right, and negative values are offset to the left. The default value is 0.

\r\n

\r\n

\r\n

\r\n MsgBox Range(\\"B2\\").Offset(RowOffset:=-1, ColumnOffset:=2).Address

\r\n

\r\nIs the SAME as;

\r\n

\r\n MsgBox Range(\\"B2\\").Offset(-1,2).Address

\r\n

\r\n

\r\nReturns a reference to a range that is a specified number of rows and columns from a cell or range of cells. The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and the number of columns to be returned.Syntax = OFFSET(reference,rows,cols,height,width)

\r\n

\r\n

\r\n=OFFSET(C3,2,3,1,1) Displays the value in cell F5.

\r\n=OFFSET(C3:E5,0,-3,3,3) Returns an error, because the reference is not valid.\", \"style=\\"background: #FFFFFF;padding: 2px;font-size: 10px;width: 550px;\\"\");" style="FONT-STYLE: italic" onmouseout="GAL_hidepopup();" href="http://www.ozgrid.com/forum/autolink.php?id=5&script=showthread&forumid=8">cell is formatted as Text, then it will display the #### when the text is over the limit. Reformat the cell to General and the text should again show.

Right click on the cell, click Format Cells, under the number tab, choose General.

Also, this ####, will occur is the cell width is to small.

May 16, 2008 | Microsoft Excel for PC

Look into the =SUMIF function, it sounds like this may be what you are looking for.

Hope this helps!

Hope this helps!

Apr 09, 2008 | Microsoft Excel for PC

Are you referring to the VLOOKUP function in Microsoft Excel?

I love vlookup!

Suppose you have 1 worksheet with song numbers and titles in Row 1, Cols A:B:

Song# Title

123 Love Me Tender

234 Blue Suede Shoes

345 Dixie

Another worksheet has song number and performer in Row 1, Cols A:B

Song# Performer

123 Elvis Presley

234 Carl Perkins

456 Cher

Notice there is NO performer for song number 345 in the 2nd worksheet.

Now in the 1st work sheet, cell C2 insert this LOOKUP function: =LOOKUP(A2,Sheet2!A:B)

Copy that cell to row 3 and row 4 in Col C. You should get a Performer for all songs even though there is not a song number 345 in the performer worksheet.

Help me out Mr. VLOOKUP.

Insert this VLOOKUP function in cell C2 of the first worksheet: =VLOOKUP(A2,Sheet2!A:B,2,0)

Copy that cell to row 3 and row 4 Col C. You should get the performer names for the 1st 2 songs, but not for 345 Dixie. The result should be #N/A.

That means VLOOKUP could not find a DIRECT match for song 345 in the second worksheet.

That is why I prefer VLOOKUP over LOOKUP.

I have found this explaination of the VLOOKUP parameters helpful:

1. Needle (A2)

2. Haystack (Sheet2!A:B)

3. RELATIVE Col containing result (2)

4. Need DIRECT MATCH ONLY (0)

Hope this helps.

I love vlookup!

Suppose you have 1 worksheet with song numbers and titles in Row 1, Cols A:B:

Song# Title

123 Love Me Tender

234 Blue Suede Shoes

345 Dixie

Another worksheet has song number and performer in Row 1, Cols A:B

Song# Performer

123 Elvis Presley

234 Carl Perkins

456 Cher

Notice there is NO performer for song number 345 in the 2nd worksheet.

Now in the 1st work sheet, cell C2 insert this LOOKUP function: =LOOKUP(A2,Sheet2!A:B)

Copy that cell to row 3 and row 4 in Col C. You should get a Performer for all songs even though there is not a song number 345 in the performer worksheet.

Help me out Mr. VLOOKUP.

Insert this VLOOKUP function in cell C2 of the first worksheet: =VLOOKUP(A2,Sheet2!A:B,2,0)

Copy that cell to row 3 and row 4 Col C. You should get the performer names for the 1st 2 songs, but not for 345 Dixie. The result should be #N/A.

That means VLOOKUP could not find a DIRECT match for song 345 in the second worksheet.

That is why I prefer VLOOKUP over LOOKUP.

I have found this explaination of the VLOOKUP parameters helpful:

1. Needle (A2)

2. Haystack (Sheet2!A:B)

3. RELATIVE Col containing result (2)

4. Need DIRECT MATCH ONLY (0)

Hope this helps.

Jan 07, 2008 | Computers & Internet

I love vlookup!

Suppose you have 1 worksheet with song numbers and titles in Row 1, Cols A:B:

Song# Title

123 Love Me Tender

234 Blue Suede Shoes

345 Dixie

Another worksheet has song number and performer in Row 1, Cols A:B

Song# Performer

123 Elvis Presley

234 Carl Perkins

456 Cher

Notice there is NO performer for song number 345 in the 2nd worksheet.

Now in the 1st work sheet, cell C2 insert this LOOKUP function: =LOOKUP(A2,Sheet2!A:B)

Copy that cell to row 3 and row 4 in Col C. You should get a Performer for all songs even though there is not a song number 345 in the performer worksheet.

Help me out Mr. VLOOKUP.

Insert this VLOOKUP function in cell C2 of the first worksheet: =VLOOKUP(A2,Sheet2!A:B,2,0)

Copy that cell to row 3 and row 4 Col C. You should get the performer names for the 1st 2 songs, but not for 345 Dixie. The result should be #N/A.

That means VLOOKUP could not find a DIRECT match for song 345 in the second worksheet.

That is why I prefer VLOOKUP over LOOKUP.

I have found this explaination of the VLOOKUP parameters helpful:

1. Needle (A2)

2. Haystack (Sheet2!A:B)

3. RELATIVE Col containing result (2)

4. Need DIRECT MATCH ONLY (0)

Hope this helps.

Suppose you have 1 worksheet with song numbers and titles in Row 1, Cols A:B:

Song# Title

123 Love Me Tender

234 Blue Suede Shoes

345 Dixie

Another worksheet has song number and performer in Row 1, Cols A:B

Song# Performer

123 Elvis Presley

234 Carl Perkins

456 Cher

Notice there is NO performer for song number 345 in the 2nd worksheet.

Now in the 1st work sheet, cell C2 insert this LOOKUP function: =LOOKUP(A2,Sheet2!A:B)

Copy that cell to row 3 and row 4 in Col C. You should get a Performer for all songs even though there is not a song number 345 in the performer worksheet.

Help me out Mr. VLOOKUP.

Insert this VLOOKUP function in cell C2 of the first worksheet: =VLOOKUP(A2,Sheet2!A:B,2,0)

Copy that cell to row 3 and row 4 Col C. You should get the performer names for the 1st 2 songs, but not for 345 Dixie. The result should be #N/A.

That means VLOOKUP could not find a DIRECT match for song 345 in the second worksheet.

That is why I prefer VLOOKUP over LOOKUP.

I have found this explaination of the VLOOKUP parameters helpful:

1. Needle (A2)

2. Haystack (Sheet2!A:B)

3. RELATIVE Col containing result (2)

4. Need DIRECT MATCH ONLY (0)

Hope this helps.

Oct 10, 2007 | Microsoft Office Standard for PC

I love vlookup!
Suppose you have 1 worksheet with song numbers and titles in Row 1, Cols A:B:
Song# Title
123 Love Me Tender
234 Blue Suede Shoes
345 Dixie
Another worksheet has song number and performer in Row 1, Cols A:B
Song# Performer
123 Elvis Presley
234 Carl Perkins
456 Cher
Notice there is NO performer for song number 345 in the 2nd worksheet.
Now in the 1st work sheet, cell C2 insert this LOOKUP function: =LOOKUP(A2,Sheet2!A:B)
Copy that cell to row 3 and row 4 in Col C. You should get a Performer for all songs even though there is not a song number 345 in the performer worksheet.
Help me out Mr. VLOOKUP.
Insert this VLOOKUP function in cell C2 of the first worksheet: =VLOOKUP(A2,Sheet2!A:B,2,0)
Copy that cell to row 3 and row 4 Col C. You should get the performer names for the 1st 2 songs, but not for 345 Dixie. The result should be #N/A.
That means VLOOKUP could not find a DIRECT match for song 345 in the second worksheet.
That is why I prefer VLOOKUP over LOOKUP.
I have found this explaination of the VLOOKUP parameters helpful:
1. Needle (A2)
2. Haystack (Sheet2!A:B)
3. RELATIVE Col containing result (2)
4. Need DIRECT MATCH ONLY (0)
Hope this helps.
Let me know if you have any questions.

Aug 27, 2007 | Microsoft Office Standard for PC

Jan 28, 2016 | Microsoft Excel for PC

Dec 12, 2013 | Microsoft Excel for PC

Jul 23, 2013 | Microsoft Excel for PC

175 people viewed this question

Usually answered in minutes!

its a bit more complex than that i could email the whole work book for you if that would help and if you could find a solution thats not going to explode my brain i would be forever your greatest fan (does sucking up help?)

×