I am trying to run a formula that does the following:
I have three columns, an account number, recorded amount, and the actual amount. What I'm trying to do is this, if the actual amount is not equal to the recorded amount, I want to pull that line, including the account number, recorded amount, and actual amount, and put it into a separate sheet. I'm trying to get this to happen over the span of about 100 rows. So it would look like this:
Account | Recorded Amount | Actual Amount
-----------------------------------------
Company | $356 | $356
Company | $569 | $569
Company | $700 | $705 ** Doesn't match
Company | $300 | $320 ** Doesn't match
##Now since the third and fourth rows don't match their respective columns
##The data is then extracted into a separate sheet.
**Separate Spreadsheet**
Account | Recorded Amount | Actual Amount
-----------------------------------------
Company | $700 | $705
Company | $300 | $320
I've tried using Vlookup and Match functions, but can't seem to figure this one out. Any help would be appreciated!
Attempts:
Attempting to use IF statement, the problem I encounter is not being able to return the whole row. I can return a specific cell but not the entire row.
=IF(E5=D5,A5:E5,"") * give a #VALUE error
=IF(E5=D5,E5) * returns selected cell
=VLOOKUP(E15=D15,D15:E299,2,FALSE) * #N/A
Tried using it across a sequence, but it'll only return the first cell that is selected, in this case, it would just return 'Company'. I could run this for each row but that's a lot of effort and code to run that piece of code across multiple columns and rows. It's also not scalable.
The main problem I'm having is capturing the entire row. I can extract the value of a specific cell if it matches, but not the entire row of data. I would also accept that Excel is not capable of this. I was able to generate the required results in a couple of lines of code in Python but in Excel, I'm not as fluent and I'm unsure of what path to take.