=IF Formula Question

Ty_French

New Member
Joined
Feb 14, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I have figured this out before, but unfortunately lost the data. I am unsure whether I used the IF function before, or a combination of other functions, but after hours of trying I cannot figure it out.

I have a dataset/table on one tab of a sheet (screenshot 1). This table contains columns with data which I want to copy over to another tab (screenshot 2) based on cell values matching. I want the data to be pulled across if A3 matches either columns D or G of the dataset. A3 is populated by a dependant dropdown list.

The problem I am trying to overcome is the formula I am using (below) provides the data, but also provides blank rows if the criteria is not met. In the example shown, the criteria applies to row 3 within the table, and the data pulls the right information over but does it three rows down while including blank rows where the condition is not met.

How can I avoid this, only pulling information over where the criteria is met, and ignoring other entries. As mentioned, I know this is possible, but I am not as familiar with functions such as MATCH or FILTER. I have tried suggestions from other threads but cannot get them to work - any advice would be hugely appreciated!

Thank you very much.

Formula being used:
=IF((A3=Record!D2:D3002)+(A3=Record!G2:G3002),Record!D2:D3002,"")
 

Attachments

  • Screenshot2.PNG
    Screenshot2.PNG
    42.3 KB · Views: 17
  • Screenshot1.PNG
    Screenshot1.PNG
    99.8 KB · Views: 17

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi & welcome to MrExcel.
How about
Excel Formula:
=filter(Record!D2:K3002,(A3=Record!D2:D3002)+(A3=Record!G2:G3002),"")
 
Upvote 0
Solution
Hello, and thank you for your quick response!

Using this formula unfortunately returned a #SPILL! error.

Any further suggestions would be appreciated. I am looking forward to getting this working again!
1707914076084.png
 
Upvote 0
Yes!!!! Thank you SO much for your help. I did not realise that the cells right of B3 could have interfered with this (clearly!).

I am very grateful for your quick assistance. Thank you again!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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