We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Excel Code Query
Cotta
Posts: 3,667 Forumite
in Techie Stuff
Hi All,
The following code is functioning as required, however when the code meets the criteria it returns three different values "New Fee," "Source Fee" and "Old Fee" or otherwise it returns "Commission". Is there anyway to adjust this code so that instead of returning the variations of fee it simply returns "Fee"?
=IFERROR(VLOOKUP(F22,'[Fee Clients.xlsx]Sheet2'!$T:$AB,9,FALSE),"Commission")
Thanks
The following code is functioning as required, however when the code meets the criteria it returns three different values "New Fee," "Source Fee" and "Old Fee" or otherwise it returns "Commission". Is there anyway to adjust this code so that instead of returning the variations of fee it simply returns "Fee"?
=IFERROR(VLOOKUP(F22,'[Fee Clients.xlsx]Sheet2'!$T:$AB,9,FALSE),"Commission")
Thanks
0
Comments
-
I dont have excel to test this out on but try
=IF(IFERROR(VLOOKUP(F22,'[Fee Clients.xlsx]Sheet2'!$T:$AB,9,FALSE),"Commission"))="Commission","Commission","Fee")
That's just wrapping an IF statement around it, they'll be better ways of doing it0 -
Thanks Mass but this brings up an error message.0
-
I think I had 1 extra bracket, try this
=IF(IFERROR(VLOOKUP(F22,'[Fee Clients.xlsx]Sheet2'!$T:$AB,9,FALSE),"Commission")="Commission ","Commission","Fee")0 -
Excel corrects the code to the following, however this only returns a value of "FALSE" within all of the cells.
=IFERROR(VLOOKUP(F3,'[Sector Fee Clients.xlsx]Sheet2'!$T:$AB,9,FALSE),"Commission")0 -
My final effort

=IF(VLOOKUP(F22,'[Fee Clients.xlsx]Sheet2'!$T:$AB,9,FALSE),"Commission","Fee")0 -
Actually I havent given up yet. Im just curious why the IF statement doesnt work.
In another cell on the spreadsheet type this
=IF(D6="Commission","Commission","Fee")
And replace D6 with the cell that the formula is in. Does this new cell give the desired outcome.0 -
Actually I havent given up yet. Im just curious why the IF statement doesnt work.
In another cell on the spreadsheet type this
=IF(D6="Commission","Commission","Fee")
And replace D6 with the cell that the formula is in. Does this new cell give the desired outcome.
Perfect little workaround, thank you very much.0 -
Try this (untested):-
=if(iserror(match(F22,'[Fee Clients.xlsx]Sheet2'!$T:$T,0)),"Commission","Fee"):wall: Flagellation, necrophilia and bestiality - Am I flogging a dead horse? :wall:
Any posts are my opinion and only that. Please read at your own risk.0 -
We should be able to get that all inside 1 cell. Try rmg1's formula.
If that doesnt work someone else should be able to get it all inside 1 cell.0
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 352.4K Banking & Borrowing
- 253.7K Reduce Debt & Boost Income
- 454.4K Spending & Discounts
- 245.5K Work, Benefits & Business
- 601.3K Mortgages, Homes & Bills
- 177.6K Life & Family
- 259.4K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 37.7K Read-Only Boards