Looking through multiple columns for a value and entering a specific number based on the column with a value

amitk1

New Member
Joined
May 17, 2022
Messages
4
Office Version
  1. 2021
Platform
  1. Windows
Hi everyone, happy to be a part of the community.

My question is I have a dataset of about 2,500 transactions. I have allocated these transactions to specific accounts and separated them according to column, there are 25 columns that are currently in use for the allocation.
Is it possible for a formula to check if any of these columns have a value greater than 0 and if they do, enter a specific text based on the column?

For example,
Transaction 1 is a bank charge, it is in column D, the excel formula will look through each column and once it finds a value in column D it will return the text '5550'
Transaction 2 is a rental payment, it is in column A, the excel formula will look through each column and once it finds a value in Column A it will return the text '4202'

I will need to be able to edit the text it returns back, not sure if this is even possible so was looking for guidance on the subject.

Please let me know if there is anything I can explain better, thank you.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Welcome to Mr. Excel,

If would help if you used XL2BB to post a representative selection of your data with expected results.
 
Upvote 0
Hi, thank you for the warm welcome!
I have installed XL2BB and made a test worksheet, hope this helps!
I am curious about emulating the results in Column M as a formula


4000505030302025401090342020
DateName Cheques and Debits Deposits and Credits Balance Sales Accounting Advertising and Promotion Vehicle Lease Bank Service Charges Meals and Entertainment Office Expense ACCOUNT
$ -
2022-11-05Facebook Ads$ 603.54-$ 603.54$ 603.543030
9/4/2022Accounting Corporation500-$1,103.545005050
3/30/2022John K4000$ 2,896.4640004000
1/25/2022Mazda300$ 2,596.463002025
6/30/2022Mcdonalds20$ 2,576.46209034
4/4/2022Staples Office Supplies60$ 2,516.46602020
8/16/2022Royal Bank of Canada15$ 2,501.46154010
 
Upvote 0
Apologies for the double post, by Column M I mean the Account column.
 
Upvote 0
What about

Code:
=FILTER($F$2:$L$2,SUM(C5:D5)=$F5:$L5)

or even shorter and better, I suppose:

Code:
=FILTER($F$2:$L$2,""<>F5:L5)
 
Last edited:
Upvote 0
This worked like a charm. I really appreciate this.

Thank you
 
Upvote 0

Forum statistics

Threads
1,214,870
Messages
6,122,019
Members
449,060
Latest member
LinusJE

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top