Two formulas needed

SplatP1

Board Regular
Joined
Jun 15, 2010
Messages
69
Office Version
  1. 365
Platform
  1. Windows
Hello,

I need help with 2 formulas please.
Unfiltered data is in Sheet1!B2:BB1000
Sheet2!A3 is a drop down list of all country names (Sheet1!AW2:AW1000)

First formula needed for Sheet1!A2:
If the dropdown country on Sheet2!A3 matches the country in Sheet1!AW2, then put a "1" in Sheet1!A2, if not, return a "0"

Second formula needed for Sheet2!A4:
If Sheet1!A:A contains a "1", then show all matching rows (all data) on Sheet2!B:BB

Hope it makes sense!
Thanks in advance.
Owen
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hey, first formula:

=IF(sheet2!A3=sheet1!AW2,1,0)

Not quite sure what your second criteria means if I'm honest
 
Upvote 0
Thats perfect, works great.

Now I need a formula to put in Sheet 2 that will show all rows of sheet 1 that have the "1" and put it on sheet 2
 
Upvote 0
So you want sheet2 to replicate sheet1 if the first formula evaluates to a 1? Is my understanding correct?
 
Upvote 0
I think the best way to do this is to embed all of the cells in sheet2 that are occupied in sheet1 (so B2:BB1000) with the formula:

In cell B2 on sheet 2:
=IF(COUNTIF(sheet1!$A:$A,1)=0,"",IF(sheet1!B2=0,"",sheet1!B2))

Then drag that across to BB1000.

The logic says that if column A on sheet 1 contains a 1 then show the value from the corresponding cell in sheet 1 unless its 0 then show a blank, if there are no 1's in column A on sheet 1 then sheet 2 will show as blanks.
 
Upvote 0
I copied that formula from B2 to BB1000 and it displays an exact copy of ALL data, irrespective of the 1 or 0 value in Sheet1!A:A
 
Upvote 0
Aha! I see,

try this in cell B2 sheet 2 and drag across:

=IF(sheet1!$A2=0,"",IF(sheet1!B2=0,"",sheet1!B2))
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,752
Members
448,989
Latest member
mariah3

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