#1
|
|||
|
|||
Value match in a table plus formula?
I'm pretty sure the terms I used are off, but I don't know what's right.
First, this formula works, but I want to use it PLUS A FORMULA (all in one formula): IFERROR(VLOOKUP(VALUE(A1),Codes!$A$1:$B$30,2,0),VL OOKUP(TEXT(A1,0),Codes!$A$1:$B$30,2,0)) In the Codes tab, Col B data is text. In what I want to do but don't know how, Col B data can be either numeral or alpha (whatever makes this work). So this part I have [(Look up A1 in Table, when you find it, if resulting match is Y (yes) (or numeral, such as 2?), and then part I do not have: then [B2*2]] Is this possible and what would the correct formula be? To try to be more clear, I don't want to just populate the cell with a value, I want to populate the cell with the result from a formula after the VLOOKUP part is completed. Thanks |
#2
|
||||
|
||||
Perhaps?
Code:
=IF(IFERROR(VLOOKUP(VALUE(A1),Codes!$A$1:$B$30,2,0),VLOOKUP(TEXT(A1,0),Codes!$A$1:$B$30,2,0))="Y",B2*2,0) |
#3
|
|||
|
|||
Thank you so much for trying, but, it didn't work. I tried various ways to group the sections ... removed one of the VLOOKUP (text) sections to make it simpler, and I get either 0 (zero) or #N/A for all values.
|
#4
|
|||
|
|||
I reread the opening post several times, and I don't understand, what kind of data you have where, and what you want to get as result!
You have 2 pages. On page Codes you have data in columns A and B. On page NoName you have data in Column A, and you want to have a formula in some other column. 1. What type of data (numeric or text) you have in column NoName.A? Is the type always same, or it can vary? 2. What type of data you have in column Codes.A? Is the type always same, or it can vary? 3. For both columns, are real formats for cells same as cell format? In excel when you p.e. have a cell formatted as text with numeric value entered, and later you change the cell format to number, the entry remains a text until you edit the cell (and vice versa). To correct entry formats for a range: a) when new format is numeric, save a value 1 or 0 into some free cell, copy it, select the range you want to correct formats at, and from dropdown menu select PasteSpecial.Multiply or PasteSpecial Add (depending the value you copied before); b) when the new format is text, into free column on first datarow enter the formula like Code:
="" & A1 4. Are data types always same in columns NoName.A and Codes.A? 5. What is data type in column Codes.B? From your post: Quote:
6. What do you want get for result? The value from column B of sheet NoName multiplied with 2 or 0, depending on result of vlookup? Or something else? |
#5
|
|||
|
|||
Thank you so much for trying!
I made an image to explain more clearly (hopefully). Technically all of the data involved in this is numbers, but the use of both Value and Text in VLOOKUP is only because sometimes the cells get read properly and sometimes they don't (by Excel). I fix that by using both. This is not a problem and I get the correct results. What I need help with now is that I want to add a second complete formula that multiples the Fee % found in the table times another cell value on the same row. I have about 5000 rows of data for this project, in case that matters. Hopefully this helps! |
#6
|
||||
|
||||
If your formula gives you a correct result, then you just need to add the multiplication...
Code:
=IFERROR(VLOOKUP(VALUE(B2),Codes!$A$1:$B$30,2,0),VLOOKUP(TEXT(B2,0),Codes!$A$1:$B$30,2,0))*A2 |
#7
|
|||
|
|||
Quote:
Excel just cracks me up. I can build up such complicated factors unnecessarily! Thank you ANGEL. |
#8
|
|||
|
|||
FYI, This is what I currently have:
Code:
=ROUND(IFERROR(VLOOKUP(VALUE(P1398),FEE!$A$4:$B$118,2,0),VLOOKUP(TEXT(P1398,0),FEE!$A$4:$B$118,2,0))*(J1398),2) |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Formula that looks at more than one criteria and then adds up those that match | DazzyBee | Excel | 2 | 01-20-2017 11:29 PM |
index / match Formula | dmcg9760 | Excel Programming | 1 | 11-08-2015 03:16 PM |
Complex Formula using INDEX and Match needed | OTPM | Excel | 5 | 05-23-2013 01:22 AM |
Help with multiple match and index formula | ryanwood | Excel | 1 | 09-12-2012 07:53 AM |
Need another formula to match my last one | tinkertron | Excel | 2 | 04-29-2009 02:17 PM |