Recoding Area labels based on zip code data in excel - spss

Basically, I'm using SPSS and have a variable named AREA that includes different major counties in California. Within this variable there is a value label for "Other" and I want to be able to relabel the data to go in their respective county. I have an excel sheet with all the zip codes that fall into those "Other" counties and do have a zip code data in the file as well. There are 400+ zip codes so I'm trying to see if there is an easy alternative to having to manually type in each zipcode into syntax to recode those values.
I've tried seeing if there was a way to reference the excel workbook, but have come up empty handed.
Any guidance or approaches to this problem would be appreciated!
The data in excel has unique zipcodes with corresponding Area value in cell to the right. In the data set there may be multiple instances of each zipcode.

Related

How to move a checkbox with a row in google sheets with data sorted using SORT?

I am currently a college student who was trying to make a dynamic google sheet where my data is organized. The premise is as follows:
I input raw data into one spread sheet titled "Raw Data"
That data from raw data is automatically sorted by date using the SORT function to keep it dynamically updated.
If an item in the organized data is checked, then the row turns gray and updates into a corresponding chart.
My problem is that as I add or edit data, the checkbox is stuck to the row. In the first picture, you see the normal data as is.
organized spreadsheet data using a SORT function
However, lets say I add a due date for an assignment on 1/31/23. Then this happens.
Spreadsheet data following SORT function modified to show problem
So overall, my question is how can I lock a checkbox to a specific row so if the row is moved, the checkbox moves with it? If it is needed, I have a public link to the spreadsheet if it helps understand the problem:
Public Spreadsheet 1/31 for Clarification
I currently tried several data validation rules but most of them simply locked the cell from being edited if it was checked.
I also tried modifying the RAW data and adding a checkbox there before the sort function refreshes but that negates the point of the sheet at all then.
I was not sure how else to go about it trying to lock it into that place. Also, I was not sure how to upload as a MARKDOWN text table so I figured an image would suffice for the problem.

Create a report from google sheets

I have a Google Sheets file I use to enter data on different properties.
Each row in this file represents a single property.
If a certain property is of interest, I would like generate a report for it.
I need a functionality that will extract all data fields from a single row, and insert them in a new file (google sheets or preferably a Google Docs file) with a pre built format that would present the data nicely like a report.
Thanking you in advance
Avi
Here is a very preliminary answer, to see if this is the right direction.
See my sample sheet.
This lets you select, in C3, which address you want a report on. The fields shown in green change as you select a different address. All of the report fields could be modified like this - you just need to point to which column in the Properties database contains the values.
Is this roughly what you were looking to achieve?

Creating Dynamic Sheet Cell Reference List for pulling numbers to SUM

I've been working on building a data analysis sheet, which is quite verbose at the moment and a bit more complicated than it should be as I've been trying to figure this out. Please note, I work doing student data in a school.
Basically, I have two sets of input data:
Data imported from a CSV file that includes test data and codes for Common Core Standards and the questions tied to those standards as a whole class summary
Data imported from a CSV file that includes individual scores by question
I am looking to construct 2 views:
A view that collates and displays data of individual standards per student that includes a dropdown to change the standard allowing a teacher to see class performance by standard in a broad view. The drop-down is populated dynamically from the input data (so staff could eventually dump data and go directly to reports)
A view that collates and displays data of individual students broken down by performance on each standard allowing a teachers to see the broader spectrum for each student. The student drop-down is populated from Source list 2.
I have been able to build the first view, but am struggling with the second. I've been able to separate the question codes and develop strings of cell references to the scoring data, including a dynamic reference to the row the selected student's score data appears on in the second source set from above.
I tried to pass through an indirect() formula into a sum() so as to process for a mean evaluation, and have encountered errors. I think SUM() doesn't process comma-separated cell reference lists from Indirect() [or in general] or there is something that I am missing to help parse it. Here is the formula I have tried:
=Sum(vlookup(D7,CCCodeManip!$A:$C,3,false))
CCCodeManip!C:C includes the created text (based on the dynamic standards and question codes, etc), here's an example of what would be found there:
'M-ADI'!M17, 'M-ADI'!N17, 'M-ADI'!O17, 'M-ADI'!P17, 'M-ADI'!Q17, 'M-ADI'!R17, 'M-ADI'!J17
I need these to be dynamic so that teachers can input different sets of standards, question, and student data and the sheet automatically collates and reports it in uniform ways (with an upward bound of 20 standards as I currently have it built)
Here is a link to the sheet I built, with names and ID anonymized. There's a CRAP TON of sub-tabs, and that's really just being able to split apart and re-combine data neatly without things error-ing out due to data overlapping, aside from a few different attempts and different approaches to parse the cell reference strings.
The first two tabs are the current status of the data views. I plan to hide a bunch of the functional stuff that is there to help pull data accurately.
The 3rd and 4th tab are the source data sets. 5th is a modified version of source data that allows me to reference things better, and I've tried to arrange the sheets most relevant towards the front of the set.
https://docs.google.com/spreadsheets/d/1fR_2n60lenxkvjZSzp2VDGyTUO6l-3wzwaV4P-IQ_5Y/edit?usp=sharing
Some have a different approach? I am aware that I might be as far as I cn go with this and perhaps should consider scripts - my coding experience is a bit out of date and my strength is more with the formulas, but I can dig into things with some direction, if anyone can help.
Ok so I noticed something.
It seems the failure is in the indirect reference:
=indirect(CCCodeManip!C3)
The string I am trying to parse via indirect is going to be generated into something like this, dynamic from reference to other data:
'M-ADI'!M17, 'M-ADI'!N17, 'M-ADI'!O17, 'M-ADI'!P17, 'M-ADI'!Q17, 'M-ADI'!R17, 'M-ADI'!J17
The indirect returns the error that the above string is not a cell reference with the #REF code.
Can someone give me a clue as to what is causing this? I am going to dig into the docs on Indirect() from google and will post anything that I find.
Perhaps it is that indirect() can't handle lists, but only specific references and arrays, which may require me a to build a sheet to do the SUM formula on for each question set (?)
So I think I figured it out, but i Ended up parsing the data differently, basically doing the sum based on individual cell references and a separate sum formula, bypassing the need to do it all at once, it jsut makes my sheets a lot dirtier! I am eventually going to see if code could do it better if I need to, but this is closed for now.
Basically, I did individual cell references to recall scores in a row, then used a separate SUM formula, and created references / structures to be able to pull those sum() results. Achieves the same end, but with extra crap on the sheet.

Export row level variable labels, value labels and value

Somewhat new to SPSS and wondering if its possible to export into an excel file a data map containing the variable label, value label and corresponding value at a row level. I know you can download a data map via Display Data File Information but the variable label is a header rather than displayed on each row.
Example...
“what is your gender”,”male”,”1”
“what is your gender”,”female”,”2”
"primary car brand","Chevy","1"
"primary car brand","Buick","2"
"primary car brand","Fiat","3"
"primary car brand","Toyota","4"
"primary car brand","Kia","5"
Any assistance is appreciated.
See whether the CODEBOOK (Analyze > Reports > Codebook) procedure is more to your liking. Any Viewer table can be exported to Excel either via File > Export or using OMS. Or the exact format of the display you showed can be produced as a table using Python programmability. Details if you need to go that way.
In many use cases, the APPLY DICTIONARY (Data > Copy Data Properties) does what's needed without the need to create an external listing.

How do I use Macros to copy select data from one worksheet to another on Excel?

I need to create a Macro on Excel to keep track of changing contracts. There's already an existing macro that updates the contract data so I need to create another macro...
There are two worksheets. On the first worksheet is a bunch of data with each row representing one contract. There are several categories (Contract #, Date, Price, etc.).
I need to write a Macro that finds only certain contracts fitting specific criteria (like, contacts at a specific date or a certain price), copies and pastes them into the second worksheet.
What I've done so far:
I've figured out a bit of a convoluted way of doing it using IF and OR functions. So using OR I specify the criteria and IF to basically find the corresponding data if things are TRUE.
When things are false, a 0 is entered. The problem is I have tons of rows of zeroes---rows/contracts that didn't fit the criteria. When I try to use the find command (CTRL+F) to find, highlight, and properly delete (with rows shifted up) all the zeroes, Macro doesn't record it and I'm not sure how to write it in the code.
Any insight would help!
Just change your formula to:
=IF(OR(TermSheet!$E40=41220,TermSheet!$M40="bpxx"),TermSheet!E40,"")

Resources