I have modifiers for women's clothing sizes set up and am trying to add the size zero. However, when I enter "0" store thinks that the row is empty and doesn't capture it. Could you add support for "0"? Thanks
Could you not set it as zero in store and then run a simple conditional in the template to check for 'zero' and replace that value with 0 (number)?
Related
I am trying to create a variable "thromboembolism death", 0 if it is not the cause of death, 1 if it is.
Is there any way to sort through this data set through spss / excel in order to create a new variable if one of the key terms e.g (DVT, Pulmonary embolism, thromboembolism) appear in the line of text? Here is what my data looks like right now.
https://i.stack.imgur.com/WDrBs.png
Also the data set is very large. 250000+ cases. I am new to data analysis, thanks for the help!
In SPSS, assuming you have a variable named death_cause with description verbatims:
COMPUTE thromboembolism_death = (INDEX(UPCASE(death_cause),'DVT') > 0)
OR (INDEX(UPCASE(death_cause),'PULMONARY EMBOLISM') > 0)
OR (INDEX(UPCASE(death_cause),'THROMBOEMBOLISM') > 0).
EXE .
In Excel, you could take a similar approach. Assuming your text verbatims are in column A:
=IF(OR(ISNUMBER(SEARCH("DVT",A1)),ISNUMBER(SEARCH("PULMONARY EMBOLISM",A1)),ISNUMBER(SEARCH("THROMBOEMBOLISM",A1))),1,0)
Alternatively, if you're comfortable using SUMPRODUCT(), the formula gets a bit shorter. Assuming you list your "strings to search for" in cells C2:C5:
=SUMPRODUCT(--ISNUMBER(SEARCH(C2:C5,A1)))>0
Note that all of the above options are case-insensitive.
I have started to program a macro where I would need to assign a part number (PN) of a product to a variable for a later search:
Sheets("Panel").Activate
Range("E10").Select
PN_value = ActiveCell.Value
The above statements work fine, except in the case of zero prefix ( i.e. 01200946 ) the assigned value to the variable cuts the first zero and then the compare of the read out PNs in a loop with this variable is not working properly.
I have found some advice for hard formatting as "00000000" for similar cases but unfortunatelly my master data file does not contain PNs with all the same lengths and in the future some PNs might have mixed char&num format. So if possible I would need some way to assign the exact value of the cell to the variable rather than force in advance some fixed format.
I've found some tools that can do what I want, but despite trying various options I can't work out how to put them in my existing formula!
I'm trying to generate an invoice reference number, which would look like 'ABC000012' - with the first row being ABC000001 and increasing in number as each row is added. I can currently generate 'ABC1' and so on, but can't work out how to add the preceding 0s.
I'm currently using CONCATENATE as follows:
=IF(ISBLANK(B2),,CONCATENATE("ABC",(ROW(1:1))))
What do I need to add to this, and where, in order to get the references I'm looking for?
I'm also happy to be advised that I should change the whole formula if there's something different that will work better
Thanks
Use TEXT() to set the preceding 0:
=IF(ISBLANK(B2),"",CONCATENATE("ABC",TEXT(ROW(1:1),"000000")))
=IF(ISBLANK(B2),"","ABC"&RIGHT("000000"&ROW(1:1),6))
This is based off Scott Craner's answer. The difference is that is will limit the number of digits in your invoice to 6 characters. if you want it to always be 8 characters long change the 6 to an 8 and increase the number of 0 between the " ". Alternatively you could also do:
=IF(ISBLANK(B2),"","ABC"&RIGHT(rept(0,6)&ROW(1:1),6))
In the above formula to change the number of digits n the invoice number, you would need to change both 6's
Caveat:
If there is a blank cell in the middle of your list, that number will be skipped for each blank cell. To avoid this, you will need a different counting method than row(1:1).
I have zero length strings in an excel file that I am importing into access. I would like to convert these zero length strings into a completely blank cell. I would like to do this completely in Access. Any suggestions?
I have tried using a iif and format within access but I can't change the format. My problem is the cell needs to either be blank or formatted as a number.
Not sure what you mean exactly with "completely blank cell" and as you didn't provide any detail, it's hard to tell.
However, by making sure that the property "Allow Zero Length" for the Data Type of the Field in the Access table is set to false (for a Text field, of course) then these values should be converted to a Null value when imported and should appear as completetly blank.
You could also make an update query after the importation to convert any zero length strings to a Null value; something like:
Update Table1 Set Field1 = Null Where Field1 = ""
The following column contains a dummy variable for gender:
gender
1
0
2
0
where 1 is male, 2 is female, 0 is unknown.
I want to assign labels to the values, like in Stata, so that when I construct a chart, the legend would show Male instead of 1. Also, it would be nice if the dataset depicted string Male, but assumed value 1 for calculations.
How can I do that?
What you want is not (as far as I know) supported in Excel. What you need is sort of an ID value and a display value as is commonly known from DB-oriented controls like a Listbox in Access or the like. This does not exist in a single Excel cell, you'd have to simply make another column or replace the values.
BUT...
In this specific case you could reach the goal with the following 'hack':
The cells' numberformat supports different format strings for positive and negative values and for 0. For your three-valued-logic, you could make use of that, but you'd have to change your IDs to 1, 0 and -1. Then use "Male";"Female";"Unknown" as a custom format string.
... if this does not work, rather use a seperate column with a simple formula.