Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. bryanbayfield

    Counting number of times the customer has been contacted: Count restart with 1 after each order

    data contact1; set contact; by accountid; if first.accountid then temp=0; if contactdate<=orderdate then temp+1; run:
  2. bryanbayfield

    Assign value from macro variable

    Essentially, MACRO code is code that writes Base code. Just remember that and you won't go far wrong. So in theis case, you are returning all the Base code that the macro writes to the RHS of the UltimateParent assignment.
  3. bryanbayfield

    Assigning ID number to multiple cases.

    OK, think this one will do it ... You will obviously be creating a composite surname variable from "name" as this is what identifies a family. That is your third variable along with address and telephone. First sort by surname, then create a new dataset from that using by processing on the...
  4. bryanbayfield

    Assigning ID number to multiple cases.

    You know what, that's actually a bit trickier than you'd think at first glance. Perhaps you could duplicate the dataset, and then do a cartesian join between the two, and delete rows where there wasn't a match on any of the three fields. I'm not sure, will have to think about it. Difficult.
  5. bryanbayfield

    Assigning ID number to multiple cases.

    Can you please clarify ... the first two records match on name, but "Family ID" is 1, yet the last 3 records match on name, address and phone number and have a Family ID of 2. Is it 2 if there's a match on any of the fields with another observation, and 1 if not?
  6. bryanbayfield

    Help! Comparing 2 SAS data sets with one common variable

    you've said "total" number of employees is in dataset a ... but that both datasets have SSN (American social security number? Which would be unique), which would indicate that there is one record per employee in each dataset? If so, just do a proc summary for both datasets, eg: proc summary...
  7. bryanbayfield

    SAS book recommendations

    You need to get your hands dirty, it's a painful process, but you'll feel so much better for it at the end. If your current job isn't offering you the opportunities, then you might need to look elsewhere. Actually doing it is the best way to learn. I spent 3 and a half years in a job then...
  8. bryanbayfield

    SAS book recommendations

    Being lazy helps ... it forces you to find better, more efficient, ways to do things. Maybe joining the SAS-L mailing list would help, don't ask questions yourself, just lurk. Not a big fan of the little SAS book myself, I prefer "Sharpening Your SAS Skills" but since all that does is more or...
  9. bryanbayfield

    obtaining filepath

    Excellent post, unfortunately my company is still using version 8.02, and it seems this only works in version 9? I shall give you a star anyway, because I will file that one away for future knowledge! Thanks.
  10. bryanbayfield

    obtaining filepath

    It's run in interactive mode, rather than from a shell. Oh well, not to worry, thanks for trying. You'd think they'd be some way, somehow, but alas not.
  11. bryanbayfield

    Running a Loop that Counts Observations

    I think the following would be worth considering, it should be quite efficient, given number of obs ... data dummy; set test(where=(upcase(type)="TRADE" and time()-time<="00:30"t)); run; data _null_; set dummy nobs=last30tr; put "Number of trades in last 30 mins is ..." last30tr...
  12. bryanbayfield

    obtaining filepath

    Hi: I need to obtain a string representing the "long" filename of a program, and the code actually needs to be written inside that program. So, if the filename of the program is C:/Windows/Desktop/blah.sas I need some code I can put within that program that returns...
  13. bryanbayfield

    Perform a sum on textbox values

    Try using Val instead of a conversion function.
  14. bryanbayfield

    Help on a button to export a specified sheet to a new xl file

    Use the control toolbox toolbar to draw a command button on your workbook - I have left t as command button 1, rename it to whatever you like, but if you do you'll have to edit the code below. In design mode double click on the button and insert the code below into the shell code. Take design...
  15. bryanbayfield

    How to write a csv file?

    Either use the filesystemobject (common to all ms office object models) or use open filename for [append|output] as #filenumber. Try digging around in teh VBA help files.
  16. bryanbayfield

    Pass a multpile range to a function

    Hmmm ... quirky. One way round it is to have a named range, then pass the named range as the range argument rather than a non-contiguous set of ranges.
  17. bryanbayfield

    Volatile Functions (EXCEL)

    I think I'd rather remove the confirmation part and just make the function volatile. The reason I'd coded the confirmation part was to ensure that if the user changed cells on sheet 1, they were given the chance to make the formulae recalculate. But if that's done automatically, there's no point.
  18. bryanbayfield

    Volatile Functions (EXCEL)

    A range in Sheet 1 is included in the UDF code, but not the worksheet function. So that makes it volatile with reference to sheet 1? The VBA help file comes up trumps - again - not.
  19. bryanbayfield

    Volatile Functions (EXCEL)

    OK dudes, riddle me this. Volatile functions, VBA help: Marks a user-defined function as volatile. A volatile function must be recalculated whenever calculation occurs in any cells on the worksheet. I've marked my function as volatile - it is used on sheet 3, and takes two arguments - one is...
  20. bryanbayfield

    Convert Date from yyyymmdd to mm/dd/yyyy

    =IF(NOT(ISBLANK(A1)),DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2)),&quot;&quot;)

Part and Inventory Search

Back
Top