Google Sheets: Select and show some cells

Ayman93

New Member
Joined
Nov 6, 2021
Messages
2
Office Version
  1. 2019
Platform
  1. MacOS
Hi, I'm trying to do some things with excel Google Sheets but I'm having some problems.
My first question is this: What if I want to show some cells based on the value of another, for example how can I show those numbers just if there's yes in the next cell?
I don't want to filter them because I need to have them like this in other cells, this is an example of the result that I want to get:

Schermata 2021-11-06 alle 14.49.19.png


So if b2 is yes show a2, if b3 is yes show a3 etc. and I don't want to have blank cells between the numbers
 
Last edited by a moderator:

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
There are many ways to do that, with excel 2019 this is probably the easiest.
Book1
ABC
21Yes1
32No3
43Yes5
54No 
65Yes 
7
Sheet1
Cell Formulas
RangeFormula
C2:C6C2=IFERROR(AGGREGATE(15,6,$A$2:$A$6/($B$2:$B$6="Yes"),ROWS(C$2:C2)),"")
 
Upvote 0
1) Are the numbers in Column A really 1, 2, 3, etc. or are those just simplified stand-in values for what is really there?

2) Is the first cell with a value in Row 1 or Row 2?
 
Upvote 0
I can't use Jason's solution because I'm using google sheets and aggregate is not supported, I'm sorry maybe I should specify it.

Yes Rick, is just a simplified example.
The real case is that I have some names in the column A, yes or no in column B, and I need to extrapolate those names that have yes in the column B.
 
Upvote 0
I don't know much about google sheets, but in excel this would work (put in cell c2 and copy down):

=if(b2="Yes",insert your formula to calculate the value in c here,"")

"" will give you a blank for cell C2 unless B2 =yes, you could also enter a 0 or another formula if you want if that condition is false
 
Upvote 0
With sheets, perhaps
Excel Formula:
=FILTER(A2:A10,B2:B10="Yes")
Also, there is a separate section of the forum for google sheets questions (General discussion and other applications). I'll put in a request for this one to be moved for you.
As you rightly said though, it would be better to specify it in your question to avoid any possible confusion.
 
Upvote 0
Yes, your first post was a little misleading too, as you started off saying:
Hi, I'm trying to do some things with excel but I'm having some problems.

If you want to post Google Sheets questions, you will want to post them to the forum that Jason mentioned AND be sure to make it clear in your thread title and/or first post that it is, in fact, a Google Sheets question. I will update your thread title so that it is clear to others who may try to help.
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,346
Members
452,638
Latest member
Oluwabukunmi

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