Excel formula help

excel_learnerz

Board Regular
Joined
Dec 12, 2018
Messages
73
in excel is it possible with a formula to compare two columns, just two

column 1 the data in the row looks like (2, 4, 5, 3)

column 2 (0, 1, 0, 1)

so in column 3 it would be (4, 3) as i only want to use the values where column 2 has a 1 value
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
What version of Excel are you using?
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also can you post some sample data along with expected results.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Book5
ABCDEFGHI
1Numbers / databooleanby filter:by power query:by power query:
2000filter by: (enter 0 or 1)
30101
4204
5014
6709Numbers / dataNumbers / data
74100
85000
94144
105044
119199
12
13
Sheet1
Cell Formulas
RangeFormula
D2:D6D2=FILTER($A$2:$A$11,$B$2:$B$11=1)
Dynamic array formulas.


No helper Table for PQ - manual filter change required:
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Filtered Rows" = Table.SelectRows(Source, each ([boolean] = 1)),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"boolean"})
in
    #"Removed Columns"

Helper Table to choose alue from:
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Filtered Rows" = Table.SelectRows(Source, each ([boolean] = #"0or1")),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"boolean"})
in
    #"Removed Columns"

Power Query:
= Excel.CurrentWorkbook(){[Name="Table3"]}[Content]{0}[#"filter by: (enter 0 or 1)"]

 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,048
Members
448,543
Latest member
MartinLarkin

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