E
Eric Maccabi
Member since 12/2/2022

Achievements

Activity

Community guides
Community videos
Questions
Total replies
Recommended
User activity chart
Post history
got it! what is your process for inputting the values into the cells in F17:P23? if you can have an input location separate from that table, i believe it would be simple to effectively have the table in that location constantly update to reflect the latest month and pull from the data (that would live somewhere else where data is input).

Do you know what i mean? 
Hi Chelsea,

From what i can tell, this is difficult to accomplish directly in sheets with formula and will likely need to use AppScript to do. Can you please share the file or a copy of it so we can better understand how you're using the sheet - that will help determine if this truly needs a script to make the desired functionality happen.

Best,
E
Hey User, 

thanks for sharing the doc. Can you explain a bit more about which drop down you'd like to filter based on which value? Maybe a fully baked scenario as you'd like it to work so we can help you automate it.

Best,
E
Hi Arman,

You can do this using conditional formatting...

Since you didn't give edit access, i can explain below but won't be able to do it in the doc. Adjust settings if you want to see it in action.

highlight your table of data (Sheet1!A2:B11) Go to conditional formatting and choose "Custom formula" option.  Then, the formula you'll use is:
=OR($A2<=$B2+7,$A2>=$B2-7)

the format will test every cell in A against every cell in B within your range. The Or allows for the value in B to be above or below A up to 7 days.

Let me know if you want to see it in action (access needed) or if you have any questions!

Eric
1 upvote
Recommended answer
Hi Linda,

thanks for your question. Are you looking for a cell to the right of the date entered to be populated based on the date in the cell relative to today's date?  This is fairly straightforward to do, and the common challenges are related to the format of the dates.

At a high level, there's a function "=today()" that returns today's date. So you can create a condition where the cell returns a message if the date in the other cell (for this example, say $B$10) took place more than 30 days ago 

​=if(B10<=today()-30,"alert!","")

Happy to help further - please share a sample spreadsheet here with a tab showing how you'd like it to look if the functions were working properly.

Eric
Hi there Emmad,

This sounds like a question on analysis or data visualization (and not sheets functionality per se). I took a shot at trying to show the data in a visual that i think would be a clear representation of what you're looking to show. 

Here's a sample chart:


Feel free to take a look at the document i worked in here and let me know if you have any questions.
1 upvote
Recommended answer
Hi there,

You can make 7 different conditional formats - one for each day of the week. You can set the rule that the text equals and input the name of the day. then choose the color you want for that day. And make sure you select the complete range for the range.

if you want the entire "Monday" column to be colored, then you would still need 7 different rules, but you'd use "Custom Formula" to have it work.

Hope this helps - let me know if you'd like further support. it would be best if you shared a file with the need you're facing so I and others would better be able to assist.

Eric
Google Docs Editors•8/8/2023
Hi there,

Based on your feedback to other experts, it looks like you want to know how to do the matching using INDEX(...MATCH...) for a given cell. 

In the EM tab, i did this for you in cell B3

=index(db!$B$2:$Q$4,match($A3,db!$A$2:$A,0),MATCH(B$2,db!$B$1:$Q$1,0))

you are putting the entire db array into the first input of index correctly, but then for match, you're using syntax that looks like it fits better with SUMPRODUCT (i'm happy to elaborate if needed). index has two additional inputs after the array to index: row and column. so we're matching on row by finding what element "A3" is in the array's first column, and matching on column by finding what column B2 is in the arrays first row. 

Hope this helps - please let me know!
Eric
1 upvote
Recommended answer
Hi Dale,

Yes - this seems doable. To spit out exactly what you're looking for (above), you can create a new tab and in that tab, populate a single column. Make it wide enough to fit the width of you window. In cell A1, write:
=join(", ",Sheet1!A1:Z1)
fill that down to the rest of the column and you should be set.

Let me know if it works!
Eric
Hi there,

If the files are indeed two separate files, you can use IMPORTRANGE to pull data from one file to the other. The syntax for this can be found here:



If both tabs are part of the same file, than you can simply reference the cell you want to pull from with this syntax:
[sheetname]![cell] ... example: if the sheet containing the data is named     DATA TAB 
and if the data is in cell A1
you can pull it in to a new sheet by entering

='DATA TAB'!A1

I completely agree with Mr Shane - if you can show us what you're looking to do more clearly in the form of an example, we'd be happy to assist.

Eric
Hi,

This sounds like a fun problem to solve - can you please point to exactly where the data is and a tab that has the desired output? (it's hard to know what i'm looking at when accessing the doc, and this way we can all better assist).

Thanks,
Eric
Hi Manali,

The PROPER function may be what you're looking for. If cell A1 contains:
  my name is JOHN DOE
=proper(A1) would produce
  My Name Is John Doe

Hope that helps!
Eric
Hi there,

The above solution will work for what you're trying to do.
the "and(H2>0,...)" included in the above solution is just an added condition to restrict formatting to cases where H2>0. it's not necessary to do what you're asking.

Conditional Formatting  Custom formula works dynamically. So the formula you put in should be specific for the first cell in your range (in the above case, the range is H2:H) and then as the formatting considers each subsequent cell in the range, the formula dynamically adjusts. To prevent the formula from changing as you move down, you would need to use "$" to lock the column or row.

Hope this helps!
Eric
1 upvote
Recommended answer
Google Docs Editors•4/26/2023
Hi Kajsa,

Possibly - but can you elaborate further? what is a "Card" and is there a doc you're collecting the information in? Please share that doc if so for our context.
Google Docs Editors•4/26/2023
Hi Perry,

This sounds doable. can you please share the file here so we can take a look and provide a solution?

Thanks,
Eric
so to see column F sorted, you need to look at the sort column, column F. It's in order.

this is working because of my function: =sort(PRELIM!A2:I,6,1)

the first input is the array i want to have sorted. second input "6" is for which column of my array should be the one we sort based off of, and the third input "1" tells it to sort ASCENDING.
yes! click on the line towards the top of your page that says when the doc was last edited. then the right hand sidebar will show you various saved versions of the doc based on different dates/times. You can select a previous version and preview it or even revert to that version.

The great way this feature works is that if you revert, that just becomes a new version as of now/future. so you don't lose the current version or other previous versions - it's all "undo-able".

Eric
the Sort function might be what you're looking for:

Sort(array,column_to_sort,ascending/descending)

This is how i used it in a copy of your doc (because of sharing preferences pointed out by Mr. Shane...


=sort(PRELIM!A2:I,6,1)

this is in the Sort tab cell A2.

Hope this helps!
Eric
hi Alison,

The file you linked didn't have edit access so i made a copy here that anyone can edit:

i put in functions in the second sheet that do the math you're looking for.

For the match wins, wins, and scores, i used SUMIFS. For the games played, i counted how many times the team name has a score >=0 in the columns to the right on the schedule.

For the list of teams, i grabbed them from sheet one using a function but not sure it's any more useful than the approach you had. the only difference is that it allows you to add teams or change the order and it sheet 2 will work as desired regardless of those changes.

Hope this is all helpful - please let me know if you need any explanation or clarity on anything i did.

Eric
Google Docs Editors•3/30/2023
Hi there,

we don't have edit access, but this should do what you're looking for:
=byrow(C4:Z23,LAMBDA(x,sumifs(x,C$3:Z$3,"Hdr2")))

enter that formula in cell B4 and it should populate all of column B from 4 down.
1 upvote
Recommended answer
i believe above is a great solution. Then, if you want that to be a dropdown, you can have the formula above (in IceSwan's response) pasted into a separate sheet and reference that for you data validation where ever you want the dropdown to appear.
2 upvotes
Recommended answer
Google Docs Editors•2/9/2023
hi there - if you're willing to adjust the schedule's format slightly, this is a fairly straightforward thing to do. 

The re-formatting i'm suggesting is to include the date to the right of every entry in each date table. i did this in white text in white background so you can't see them in the EM Schedule tab.

EM Schedule and EM Example show what i mean.  This works, but i dont see how this scales very nicely - what does your full calendar look like?

Eric
1 upvote
Recommended answer
you can reference the sheet if you need to see something on it. 

you can choose the sheet from the list of sheets if you click on the bottom left button (to the left of the sheet tabs).
looks like it's working - it's a conditional formatting custom formula that looks up the corresponding cell.

thanks! i created a copy of report tab - it has the lists of dates and limits to the 30 hours (feel free to test). 

It currently displays the running total of hours for that individual. If you would prefer to see how many hours per day, i can make that change - let me know.

Eric
Hi there,

We don't have edit access to your file - please share that. 

Also, what is meant by "AM" and "3rd"? Also, (i suspect related), how are hours calculated?
hi there,

my recommendation is to have a formula in the colored cells of the gantt chart that is an if condition: 
IF there's a value–when you filter the permissions tab–with the employee name, a leave start date less than the cell's date value, and a leave end date that's greater than the cell's date value, 
THEN 1
ELSE ""

Then, use your conditional formatting to detect the 1's and make the cell red if it's a 1, or move on to the next formatting rule otherwise.

I'll try adding it to your doc now, in a copy of tab, but that's the idea.

Hope this helps!
Eric
Google Docs Editors•2/6/2023
Hi there,

I agree with previous commenter - access would be super helpful!

That said, here's my thinking for you:

1. as far as i know, you won't be able to have "month(A)" as the start of your condition - the function MONTH (as far as i know) won't work in the double quotes and as the left hand side of the condition. There's a way around this:
for the array of your query, you can add columns for month and year as follows:

Replace
​Leaveresponse!A1:H
with
{
Leaveresponse!A1:H,
arrayformula(month(Leaveresponse!A1:A)),
arrayformula(year(Leaveresponse!A1:A))
}
*i spaced it out because of this comment box cutting the width but you can ignore every line break

then, you won't be able to reference columns by their letter anymore, but rather, use: Col1 for A, Col2 for B, etc. You have added two new columns: Col9 and Col10 - these are the month and year.

for your query, you can now write:

=query({Leaveresponse!A1:H,arrayformula(month(Leaveresponse!A1:A)),arrayformula(year(Leaveresponse!A1:A))},"Select * where Col9 = month(now()) and Col10 = year(now())",1)

but you're not done... the bold, italic, underlined text is still flawed, because, like i said before - as far as i know, you cannot include those functions within the double quotes, but there's a way around it:

you need to close the double quotes before the function. then append the function to the double quoted text using the & symbol. then once the function is complete, use & again and reopen the double quotes. 

Final product will look like this:

=query({Leaveresponse!A1:H,arrayformula(month(Leaveresponse!A1:A)),arrayformula(year(Leaveresponse!A1:A))},"Select * where Col9 = "&month(now())&" and Col10 = "&year(now())&"",1)

Last small comment - i would change the "now()" function to "today()" just because it doesn't need to keep changing every second - you don't see the change but i imagine it's a new calc every second that may slow the doc down unnecessarily.

Hope this is helpful!
Eric
Hi there,

If you're able to share the sheet with us, we'd be able to assist. 

it's possible that the value in the cell is actually a string of text and not a date - in which case, you can (using a formula) convert that string to a date value. 

since it sounds like that's what you're dealing with, i'll explain a bit more, but if you share, i can show it to you in action:

you can use the SPLIT function to break the string up into different pieces. one input is for the string itself (just reference the cell that the string is in) and one is for the delimiter (in this case, "/").

then, you can use the INDEX function for which item from the string you want - so something like:

Index(split($A$1,"/"),2) will give you the 01 from your string example above, assuming it's the value of cell A1.

Then, use that to populate the DATE function in all three inputs. so DATE takes 3 inputs: year, month, day. So for your case, i would do something like: 

=DATE(Index(split($A$1,"/"),3),Index(split($A$1,"/"),2),Index(split($A$1,"/"),1))

if that doesnt work, you may need to use the VALUE function around every index to truly convert the "01" string into the value equal to one (for example). 

As i said, this should explain how to do it - if you'd like me to show it in action, please share the file you're working with.

Hope this helps!
Eric
Try without the curly brackets around the BCH!H2:O2

Also, because your query only spits out 7 columns, the blank row you pull in should also only be 7 columns. Doesn’t matter which since they’ll be blank, so you can replace:
{BCH!H2:O2} with BCH!A2:G2 and it should work. 
1 upvote
Recommended answer
got it - it sounds like a formatting problem as Mr Shane has pointed out - 

troubleshooting: can you type in any characters and see them show up?

if yes, it's likely a conditional formatting rule that's preventing you from seeing the output.
go to your conditional formatting rules and see if any are causing the problem. 

If no, then it might be just general formatting - change the font color or background color of that cell and see if it helps. 

Eric
Hi Raj,

Here's how i would do it:

in your master sheet, create a tab for the URLs of all your "children" sheet files. call it your ImportCodes tab.  You don't need every sheet to have it's own URL - just the file. so Column A can be the filename (i guess you're naming your files Sheet1, Sheet2, etc.) and then columnB will have the URL for that file.

Next, you want to allow for this master to importrange so you should, in columnC type:
=importrange(B1,"BookA!A1") <<assuming BookA is the name of a sheet in your first file.
and then drag that down - it'll initially give you a #Ref error that will require you to "allow" the importrange to work.

Now that you have access, you can create a new tab in Master: call it BookA. In cell A1, type BookA.

In B1, you can type:
={importrange(ImportCodes!B1,indirect(A1&"!A:Z"));
importrange(ImportCodes!B2,indirect(A1&"!A:Z"));
importrange(ImportCodes!B3,indirect(A1&"!A:Z"))}

then duplicate this tab and overwrite BookA in A1 to read BookB.

I hope this helps - If you share your file(s), we can help even more!

Eric

Hi there,

I believe F2 lets you enter into the formula of a cell.

If you're looking to find which cells contain formulae, you can toggle that view on and off with ctrl+~(same: control+~ on a Mac).

to better understand what you're seeing when you click into the cell you're having trouble with, it would be great if you can share the file with us. 

Best,
Eric

Google Docs Editors•1/17/2023
Hi there,

I have an idea for you:

you can have the data validation read from a location: say sheetx!A1:A.

Then, have that column (A:A) in sheetx be dependent on an input - so the contents of sheetx!A:A willl change when the value of an input cell are modified.

This can have the same functionality as you're describing in excel. Instead of the tables having absolute locations that you can adjust where you find them to include in your data validation, the data validation will look always in the same place but you populate that place with different lists as you see fit dynamically.

+1 to James's comment - if you can share, we can better assist you.

Eric
Google Docs Editors•1/17/2023
Hi there,

I agree with the comment above about sharing the doc - that would be helpful.

Also, what criteria are you using to decide your weights? What are you trying to accomplish with this?

Eric
assume the email address is in c10,

if they're all .com:
=left(c10,find(".com",c10)+4)

if you have others:
=iferror(left(c10,find(".com",c10)+3),iferror(left(c10,find(".org",c10)+3),left(c10,find(".net",c10)+3)))

Eric
assuming the email is in cell C10:

=REGEXREPLACE(REGEXREPLACE(C10,"gmial.com","gmail.com"),"gamil.com","gmail.com")
Hi Carly,

Can you share the sheet so we can see what exactly you're working with?

My suggestion is to use ">0" or ">=0" instead of "Positive" but i haven't seen the data you're working with.

Eric
easy fix is to put if's around every query. You can say: if(Sheetx!A1="",sheetx!A1:A10,Query(sheetx!....)

this way, it'll pull the first row of the sheet if it's blank (just so the overall array works). you need to make sure the amount of columns you pull is equal to the amount of columns in your array.
Google Docs Editors•1/17/2023
Can you please share the sheets file so I can see the values you have in d2 and e2 and how they’re formatted?
Google Docs Editors•1/16/2023
nevermind to my limitations on length of Client and Form names...

=byrow(filter(flatten(arrayformula(answers!A2:A5&"-"&split(byrow(answers!A2:A5;lambda(id;filter(answers!E:E;answers!A:A=id)));",")));flatten(arrayformula(len(split(byrow(answers!A2:A5;lambda(id;filter(answers!E:E;answers!A:A=id)));","))))>1);lambda(x;query(answers!A:E;"Select B,C,D Where A='"&left(x;find("-";x)-1)&"' AND E contains '"&right(x;len(x)-find("-";x))&"'")))

Now it doesn't matter how long each is, as long as the "-" character doesn't exist in either one. i can fix that too if you intend to use that character in your client names or form names.
Google Docs Editors•1/16/2023
Hi There,

This formula works (in your doc, Copy of tab, yellow cell)

=byrow(filter(flatten(arrayformula(answers!A2:A5&"-"&split(byrow(answers!A2:A5;lambda(id;filter(answers!E:E;answers!A:A=id)));",")));flatten(arrayformula(len(split(byrow(answers!A2:A5;lambda(id;filter(answers!E:E;answers!A:A=id)));","))))>1);lambda(x;query(answers!A:E;"Select B,C,D Where A='"&left(x;5)&"' AND E contains '"&right(x;3)&"'")))

Only if the ID is 5 characters uniformly and the client name is 3. I can make it work more generally but wanted to make sure that's needed before doing it. it's done by modifying the second inputs of the left and right functions to be more clever.

Best,
Eric
Hi there!

This'll do it if you want to stick with query:

=QUERY(IMPORTRANGE("1FxG3uZLJ59upoGsJ41eT1q_-vcBqNg_5Jy2j9fKRXf0", "SOURCE!A1:G40"), "Select Col1,Col2,Col3,Col4,Col5",0)

The other option is just to limit the importrange to be A:E... so:
=IMPORTRANGE("1FxG3uZLJ59upoGsJ41eT1q_-vcBqNg_5Jy2j9fKRXf0", "SOURCE!A1:E40")

that's actually all you need if you're not querying the data and just want it all to appear.
Hi there,

Would you please share the doc so we can take a look at what you have and what's going on?

Thanks,
Eric
Google Docs Editors•1/16/2023
It's not clear to me why this is an array formula. This seems like a simple calculation that can be done without arrayformula in the formula.

try that?
3 upvotes
Recommended answer
for your current formula:

=TEXTJOIN(" ",TRUE, TO_DATE(VLOOKUP(indirect("MasterDoc!"&address(Column(O2)-13,Row(O2)+13)),MasterDoc!D113:E133,1,0)),VLOOKUP(indirect("MasterDoc!"&address(Column(O2)-13,Row(O2)+13)),MasterDoc!D113:E133,2,0))

This is obviously looking up O2. and if you drag this right, it'll reference O3, O4, etc.
if you drag down, P2, Q2 etc.
2 upvotes
Recommended answer
I agree with Spencer.
another way to do this inside the indirect is to use the "address" function.

Address takes in two inputs for location and then another for what should lock (where the "$"s go)
so it's address([row number], [column number], [lock preference]). 

To replace O1 in your function, you would therefor want it to say:
address(Column(O1)-14,Row(O1)+14)

Why i did what i did:
I subtracted 14 from the first input because Column number of O1 is 15 but i need the first input to be a 1 for Row 1. I added 14 to the second input because row number for O1 is 1 but i need the second input to be 15 for the Column to spit out an O. This address will spit out $O$1.

How it behaves:
Then when you drag this over to P1, column of P1 is 16 and so 16-14=2 (for row 2) and row of P1 is 1 so 1+14=15 for column O) so the output becomes $O$2.

Note: the $'s in the output won't matter since the inputs are lacking them, as you fill, it'll change dynamically in the manner you desire based on your question.

IMPORTANT: Depending on where this sits (which function), you may need to put this inside INDIRECT(...). Once you share, we can better advise.

2 upvotes
Recommended answer
Hi Corey,

I believe what you're asking to be able to do is fairly straightforward. It would be easiest to demonstrate it if you shared a sheets file with the data you're looking to work with and gave us edit access to that file.  Also, if you include the desired output in the third sheet (no formula needed - just how do you want the results to come out).

The doc you shared isn't an editable sheets file for us.

Best,
Eric
Rob - 

I added a new tab with it working.

the problem was with the indirect function - it's hardcoded to include the sheetname (by default, there was no value for sheetname since it's on the same sheet. I added the sheetname in quotes within the indirect function on this tab - you should see it in formula in cell A7.
false
18263677202497951941
true
Search Help Center
true
true
true
true
true
102095
false
Search
Clear search
Close search
Main menu