create a new file from a string of text - file

I need to create a series of files with the file name of a line of text in a text document. I am on a mac and don't know about scripting. Is there a simple utility or a Terminal command where I can drag and drop in the file with the text in it and it would make the new files in the same directory?
The text file would say:
Week 1 Session 1
Week 1 Session 2
Week 1 Session 3
Week 2 Session 1
Week 2 Session 2
Week 2 Session 3
Week 3 Session 1
Week 3 Session 2
Week 3 Session 3
Week 4 Session 1
Week 4 Session 2
Week 4 Session 3
And so on for 35 weeks, with 'Week' starting a new line. This is something I would have to make periodically.
Having searched for an answer, I can see plenty of file names to a text file but not much the other way.
I apologise if this appears too simplistic but I would appreciate any help with this.

Thank you for the advice but I did find out how to do it.
On the mac you open a Terminal window and write 'touch' then the file name(s). If there is a gap in the file name, you put it in double inverted commas like this: "file 1.txt" then a space and more inverted commas if you want a second file such as
"file 1.txt" "file 2.txt"
I used Numbers (like Excel) to make all the names and pasted it in.
And that way it all worked very quickly. Low tech I am sure, but quick and useful.
Hopefully that answer will be useful to someone like me in the future.

Related

Archive historical data from a project every month to create a trend line

Milestone list Example
i couldnĀ“t find something useful, therefore i am asking you to help.
I have a spreadsheet with 1000 rows (=locations) and 300 columns (=Milestones with plan & actual dates). These entries should be archived every month for the next 4 years so i can create a trend line for every milestone and location. It means approx. 14-15 Millions cells.
Can anybody help me to automate this task? Basic structure that came to my mind ist to create a new file with 300.000 rows with specific ID (="Milestone name" & "Location") and 96 columns (months for 4 years for both dates(plan & actual). Then automatically (with vlookup?) store the dates from the master file on monthly basis to to the corresponding cells.
Thank you in advance!

Find all matching results in column and output their adjacent rows

Summary
I have a database of ~1500 entries. Some of them have more than one entry (up to 5) under the same identifier. I have a pre-set list of IDs I would like to check to see if they have multiple records, and if so, pull all of them, so I can compare them for differences.
Current solution
I currently have this working correctly, using a method to pull the 1st, 2nd, 3rd, 4th and 5th response respectively. The current formula is:
=INDEX('DATABASE'!$B:$B,SMALL(IF($A2='DATABASE'!$A:$A,ROW('DATABASE'!$A:$A)-ROW('DATABASE'!$A$1)+1),1)) for the 1st result, =INDEX('DATABASE'!$B:$B,SMALL(IF($A2='DATABASE'!$A:$A,ROW('DATABASE'!$A:$A)-ROW('DATABASE'!$A$1)+1),2)) for the second, and so on. In this case, the above code would check the value in A2 (ID2Check), and then do a match for it on the 'DATABASE' sheet in column A. If it matches, it will return the first value that matches from column B. The second piece of code above does the same, except it returns the second match from column B. ID2Check is populated by me, and the Results 1-5 are the code output. For example:
Database:
ID
Data Item
AAA
Lemons
111
Greenhouse
FOO
Computer
AAA
Monitor
CAT
Coffee
ORANGE
Pintglass
123
Birthday
FOO
Avengers
AAA
Plasters
FOO
NachoTaco
Code output:
ID2Check
Result 1
Result 2
Result 3
Result 4
Result 5
AAA
Lemons
Monitor
123
Birthday
FOO
Computer
Avengers
NachoTaco
Problem
This solution works correctly, and will pull the expected values as required. The problem is, as this code needs to be entered 5 times per identifier, and there are ~1500 records to check, I need to flash fill 7500 formulas. Unsurprisingly, this leads to Excel crashing and becoming unresponsive for the best part of 30 minutes. I am looking to find a solution that would be more efficient and stable when running en-mass. Any assistance would be appreciated.
Final Notes / Info
I'm using MSO 365, version 2202 (I cannot update beyond this). This will be run in the Desktop version of Excel. I would prefer this is done exclusively using formulas, but I am open to using Visual Basic if it would be otherwise impossible or incredibly inefficient.
=UNIQUE(C5:C15)
=TRANSPOSE(FILTER($D$5:$D$15;$C$5:$C$15=F5))
If you have access to HSTACK() function then could try-
=HSTACK(UNIQUE(A2:A11),TEXTSPLIT(TEXTJOIN("/",FALSE,BYROW(UNIQUE(A2:A11),LAMBDA(x,TEXTJOIN("|",TRUE,FILTER(B2:B11,A2:A11=x))))),"|","/",,,""))

Excel: Change the color of the cell based on a threshold reached and matching to a string

Activity
Employee
Week of May 17
Week of May 24
Inbox
Alice
3
4
Inbox
Jane
5
8
Alpha Project
Alice
10
3
Beta Project
Francis
7
5
Chi Project
Jane
4
3
I've attempted to use conditional formatting, arrays & Vlookups and unable to cleanly get the following end result.
The End result is to flag anybody working > 10 hours for a given week.
Table is above.
End result should change the color of a cell titled "Alice" outside of this table because Alice worked 13 hours during Week of May 17.
End result should change the color of a cell titled "Jane" outside of this table because Jane worked 11 hours during Week of May 24.
Francis worked 10 hours or below, so no action is needed.
Any help on this is much appreciated --
Create a condition with the following formula:
=SUMIF(B2:B6,F2,C2:C6)>10
Where B2:B6 is the column of Employee names, F2 is the cell you want coloured, and C2:C6 is the column of the May 17th week

Mining the SOLR query logfile to calculate top (most frequent) searches per mont

I need to retrieve solr query stats which show for a given time period (say one month) how times that query term was searched.
I believe the first step is to enable logging which produces entries in the log file
Has anyone solved this? Is there some basic log file crunching code to spit out a list like
eat 3000
food 2020
bread 1900
wanted to come back and answer myself.
I found a good github project that parses the log
https://github.com/dfdeshom/solr-loganalyzer

T-SQL Get Counter for # of Open Quotes in Date Range

I'm trying to figure out how many 'Open Quotes' there were in each month/year and not sure how to do this automatically. I don't want to have to manually enter time ranges to do this and looking for help.
I've uploaded a sample CSV file and data here:
https://drive.google.com/open?id=0B4xdnV0LFZI1N1kwbFUtOUpMa2c
The first two rows from the tables look like this:
tbl_QuoteWin
Quote_No Add_Date Update_Date Quote_Status
5 05-Aug-15 10-15-Oct Win
6 17-Sep-15 18-15-Nov Win
tbl_QuoteOpen
Quote_No Add_Date Update_Date Quote_Status
1 08-Aug-15 Open
3 07-Sep-15 Open
tbl_QuoteLoss
Quote_No Add_Date Update_Date Quote_Status
2 07-Aug-15 17-Oct-15 Loss
4 25-Sep-15 7-Nov-15 Loss
The desired output is a way for me to divide how many quotes we won in a month by how many quotes were open in a month. I don't know how to capture the months between 'Add_Date_Month' and 'Update_Date_Month'.
For example, in tbl_QuoteWin, quote #2 should be in the count of 'Open' quotes for Aug-2015 and Sept-2015 because this quote was in an 'Open' status before it was put in a 'Win' status in Oct-2015.
I originally tried to pull out just the month/year and then thought I might be able to do something with that but I really don't know how to tackle this problem. Even if I did a DATEDIFF() I'd get a length of time, not the actual months.
I hope this makes sense and thank you in advance for helping me or at least pointing me in the right direction.
Thank you!
SELECT MONTH(Add_Date),YEAR(Add_Date), COUNT(*)
FROM tbl_QUOTEOpen
GROUP BY MONTH(Add_Date),YEAR(Add_Date)
This solution is possible because only quotes with an open status are in the Open Quote table. Once they are won or lost, they move to another table.
The results, based on the tables in your question, would be
8 2015 1
9 2015 1

Resources