Middleware manager - select

I update text in a comment cell on a bi weekly basis. Each time I update the text I prepend the latest with Day/Month: and bold the date and colon. Thus a comment could be 2/9: asked a question
I have a process to archive the current text and Often need to copy it so the day's comment can be seen in the summary level.
I would like to select all the text before ":" including the ":" and bold it.
This would be a Macro that ran on activecell so need to search down the entire column.
My problem is one of being able to select the data especially as the length will vary from four in the case single digit days and months (2/9:) up to six in the case of double days and months (12/10:)
I was trying to go from ":" to leftmost of the cell but could only figure out how to do it using textbefore which is a function in excel but not in VBA.

Related

In sheets, duplicating responses into specific tab(s)

In forms collection, users provide me data. Most importantly in the data given is the date(s) they select (or sign up for, in my instance). I've created new tabs in the spreadsheet that are associated with the dates. I'm copying and pasting the exact information that they provide into the correct date(s) tab. Sometimes they select multiple dates. However, at this rate, I'm moving so slow and making many mistakes.
Is there a code that can duplicate what I'm doing to avoid the simple mistakes I'm making and save time?
Updated: here is the link to a mock sheet (I hope I did it right): Mock Sheet
(quick pic of what I'm working with)
https://imgur.com/a/NErREzU
Thank you for sharing your spreadsheet. Here is what I recommend:
1.) In your existing individual date sheets, select and delete whichever columns you will not be using; likewise, select and delete all rows beyond the maximum number of rows you might ever need per sheet. Keeping sheets trim is the professional standard, makes it easier to focus on the important information, and assures maximum processing speed.
2.) Delete everything from your existing individual date sheets, including the headers.
3.) Place the following formula into cell A1 of each sheet:
=FILTER({Sheet1!A:D,Sheet1!F:F},(ROW(Sheet1!A:A)=1)+(REGEXMATCH(Sheet1!E:E,"December 17, 2021")))
Adjust the date in quotation marks to match the sheet. It seems that all of your events may be happening from 5:00 - 9:00, so you don't need to include that if my assumption is correct. However, if there are different times on the same day (and will therefore be two different sheets for that day), you will need to include the start time in the formula's quotes as well, exactly as it will come in from the form (e.g., "December 17, 2021 Friday, 5:00pm"). The hyphen and end time seems it would be superfluous and can be left off.
4.) To create a new individual date sheet, simply duplicate an existing individual date sheet, rename the copy, color your header row as desired, and change the formula section between those quotes in the A1 formula (which will already be in place from the duplicate sheet.
5.) Since you will be adding further notes or other information in additional columns within each individual date sheet, be sure that you never delete information from Sheet1; otherwise, the formula-produces row information will collapse to eliminate deleted rows, and your manually entered data will not match up. For this reason, I recommend simply Hide-ing Sheet1 entirely, as this will cut down on the chance that someone may accidentally tamper with the data coming into that sheet. There is not reason to have Sheet1 showing, since all data will be included in some other sheet due to the formulas there.
The formula FILTERs in only the five target columns, which are included in the opening virtual array formed between the curly brackets { }; and it will include rows that match either one of two conditions (shown between sets of parentheses, where the plus symbol means 'OR'): either A.) the row is Row 1 (i.e., the header row information) or B.) the part in quotes can be found in Sheet1!E:E.

Counting days between 2 dates and swapping one of the dates for another if cell if not empty - google sheets

As the title suggests I'm wondering if there is a way to count days from 1 Column from the current day, then when filling in another column it stops counting the difference in days?
I'm using the following formula (found online)
={"Days";ArrayFormula(if(A3:A="",,int(B3:I)-left(A3:A,10)))}
Column A being where my date of entry is, column B is a hidden column with every row set to the
=Today()
I have another column, Column C that I will enter the date manually after date of completion, at which point I would like it to then stop counting the days and show me the number of days between Column A and C (Date 1 and Date 2)
I'm not overly experienced in google sheets but I'm thinking maybe there's a way to
check if column C is empty, if so carry on with todays date, if it's not empty to
calculate Column C - Column A?
Would making an new column for checking if the completion date has been entered work?
ISBLANK(C:C)
If so would it be possible to get one formula to check whether True or False and determine what 2 dates to work with? Lets say Column D is for ISBLANK the following is what I think of
={"Days";ArrayFormula(if(CD:D="False",,int(C3:C)-left(A3:A,10)))}
={"Days";ArrayFormula(if(D3:D="True",,int(B3:B)-left(A3:A,10)))}
When I try this I have no luck and get a "Result was not expanded automatically, please insert more rows (1)" error message
Any help would be appreciated!
Apply the formula :
=if(B2="",today(),B2)-A2
at C2. And drag downwards. That's should do.
Please share if it work/understandable/not.
Sorry it's a bit hard to understand this question, if you could post a current and desired screenshot example that would help I think.
So, I think your best bet here is to review this video if you're wanting sheets to auto-input a time entry when a cell is modified:
https://www.youtube.com/watch?v=548dD3iXetg
And it will show you how to script a cell to enter in a time entry when another cell is edited, and then you could use a variation of formulas to calculate the difference between the days of the original minus the date from the script (such as the once referenced below or by #p.phidot )
So for an example, once you script the time entry to work in the background of the sheet, you have a formula using an IF statement to make it pull between your today date or the new date being entered.
My cell references below are an example as I can't follow the question sheet.
=if(b2="",A2-B2,A2-C2)
This way if b2 is not blank it'll do a2-c2. You could also use ISBLANK if you like.

How to output Tick Box Grid Responses from Google Forms to Google Sheets as Separate Columns (plus calculates Timezone)?

I need something where our Team Members can select their regular Hours of Availability during the week, in 1 hour intervals, and the results of all Team Members can be seen in a Spreadsheet (and if they fill it out 2 or more times, it will just update their last response). From there, selecting Meeting Times where specific Members can meet should be a lot simpler!
It occurred to me recently that Google Forms and Google Sheets could be one of the best solutions here! But I really don't have much experience with Google Apps Script (which it looks like I'm going to need to do what I want it to do), and so I have some questions:
I have a 7 x 24 (7 Days of the Week by 24 1-Hour Intervals) Tick Box Grid (see linked image here). How can I set it up so it can output each Row+Column in its own separate Column in the output Google Sheet (see linked image here for my preferred output for a single Day)?
In case you're wondering what is going on with the 3rd Row: I have SUM Functions =iferror(counta(L4:L62)) (where L is the Letter of the Column) to Total the "Checked Responses" in each Column for an easy glance of the number of Xs (Yeses) for each Hour Block Column.
How can I customize each Row+Column Checked Response so it outputs as a simple letter X?
I also have a Dropdown Timezone Question, where it asks the User select their Timezone from 1 of the 25 available Timezones in the world. I would like it so their responses to the Hours of Availability Tick Box Grid is modified to match their responses in GMT. So for example, if I select my Timezone as GMT -4, and in the Tick Box Grid I select 12AM to 1AM on Sunday, the Google Sheet will include an X under 7PM to 8PM on Saturday?
Am I asking for too much from Google Forms + Google Sheets API here? And if I am, maybe there is a better Cloud Program I could use for handling this?
So #MattKing (Matthew King) worked closely with me yesterday to get my Tick Box Grid to output to Google Sheets as I intended, as well as handling Timezone Conersion! You can see the Test Results in here:
https://docs.google.com/spreadsheets/d/1g5S5Nyfwr8eHWyn-UXVfdbVj8tdZeY-lU20C2VxuCZ8/edit
I should first mention that the Form Output Sheet (called Form responses) should NOT be modified. Also NO Google API Scripting has been required to get Google Sheets to format the Form Results as I want to. Instead, new Sheets with Formulas (rather complex ones might I add) was the way to go!
To output 1 Hour increments of 24 hours for 7 days: =ARRAYFORMULA(SEQUENCE(1,24*7,0)/24+1)
Each Name in "Form Responses" (in Column A) can be output, in alphabetical order, as follows: =QUERY({'Form responses'!B2:C},"select Col1 where Col2 is not null order by Col1")
Hours of Availability in "Form Responses" (in Columns E through AB) can be output (where each Column is 1 of 24 hours in 1 of 7 days) as follows: =IF($A4="",,IF(ISNUMBER(MATCH($A4&TEXT(B$2,"ddd hh"),UTCData!$A:$A,0)),"X",))
If I want to have separate Meetings in separate Sheets, and I have the Meeting Name (selected as Checkboxes in the Form) in A1, then I can set it up so only the Names of the People who checked that Meeting will be shared as follows: =QUERY({'Form responses'!B2:C},"select Col1 where Col2 Contains'"&A1&"' order by Col1")
He also created for me 2 Sheets that handle more Formula Conversions:
Flattened Form Sheet
Flattened Formula: =ARRAYFORMULA(QUERY(SPLIT(FLATTEN('Form responses'!B2:B&"|"&'Form responses'!C2:C&"|"&'Form responses'!D2:D&"|"&MID('Form responses'!E1:AB1,64,20)&"|"&'Form responses'!E2:AB),"|",0,0),"where Col5<>''"))
Extract Times: =ARRAYFORMULA(IF(D2:D="",,SPLIT(MID(D2:D,2,LEN(D2:D)-2)," to ",0)))
UTC Conversion: =ARRAYFORMULA(IFERROR(MOD(MATCH(SPLIT(E2:E,", ",0),TITLE!C10:I10,0),7)+F2:F+C2:C/24))
UTCData Sheet
Name&UTCDayTimeCombos: =ARRAYFORMULA(QUERY(FLATTEN(IF('Flattened Form'!H2:N="",,'Flattened Form'!A2:A&TEXT('Flattened Form'!H2:N,"ddd hh"))),"where Col1<>''"))
In Column C2 - C8, it lists Sunday through Saturday
If you need someone to help you with your Google Sheets and Forms, I can't recommend Matt's help more!

Get 3-letter month abbreviation for previous month in Google Sheets

I have a spreadsheet with individual tables named DEC19, JAN20, FEB20 etc.
Each of these sheets contains the first and last days in the respective month as dates, so e.g. sheet JAN20 has 1/1/2020 in cell A5.
What I would like is an automatic way to reference the previous sheet via an INDIRECT( prevMonthAsMMMYY(A5) & "!F195" ). Without resorting to macros, how can I achieve this prevMonthAsMMMYY?
try:
=INDIRECT(TEXT("1/"&MONTH(LEFT(A47, 3)&1)-1, "mmm"&RIGHT(A47, 2))&"!F195")

Excel - Insert "day" on a cell and format it to date with current month and year

I am working on a home accounting template (and could not find any good one :-/), so I am creating one for each month. Both in my expenses and my incomes, I would like to have a date column where I just have to insert the "day" (e.g.: 22) and it automatically fills the rest with the current month and year (or I could set them in another cell).
For example: 22 + ENTER would return: 22/12/2014
If I do this, I automatically get a default date: 22/01/1900
I do not know if it is possible to change this defaul date depending on the current one or any other value.
I have tried with a different strategy: if the amount column is not empty, fill in with today's date: =IF(A3="";"";TODAY())
The problem is that I do not always register today's expenses, so I need to change it manually. I was just wondering if this is possible and there is a better way (maybe a macro?).
You need Excel to modify the cell contents after you press ENTER. The only option seems to be a Macro using the Worksheet_Change event.
Please check out this other question. I think that will help.
This can be achieved with simple formatting and use of controls that are available in Excel. VBA will give you drastically more flexibility, however the request above can be accomplished without learning VBA.
I have included a sample file here.
Steps to recreate:
Create a range of months. I created a range including the current month through 12/2014
Insert a combo box from the developer tab. Right click and select Format Control. On the Control tab, input the range you just created and then select a "linked cell". This will insert an integer to indicate which item you picked in the list, starting at 1.
Use the attached formula to add the DAY that you enter in the first column and VLOOKUP the month and year from the value chosen in the combo box.
Enhancements: I used conditional formatting to change the text color of the days you enter to WHITE. This way you won't see them. I also included some checking in the VLOOKUP formula: the day you enter must be a number and must be non-blank for a date to populate.