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 strongm 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: *

  • Users: meghaAgrawal
  • Order by date
  1. meghaAgrawal

    Outer join with multiple conditions

    I think I figured it out: select count(u.scode) from unit u, (select * from tenant where status in ('Past', 'Future')) t where u.hmy = t.hunit (+) and nvl(u.exclude, 0) = 0
  2. meghaAgrawal

    Outer join with multiple conditions

    I have unit and tenant tables. One unit can have 0 or 1 tenant. I have to extract all units with either no tenants or with tenants of particular status codes like 'Past' and 'Future'. I cannot apply OR operator on tenant.status as tenant is optional table for join. Following query doesn't...
  3. meghaAgrawal

    Count Distinct

    Great help Tony, thank you very much!
  4. meghaAgrawal

    Count Distinct

    Thank you guys - I greatly appreciate your feedback! I tried to change my approach and used the array formula - still no luck Dim charges As Range Set charges = Range(Cells(chargeMin, transColumn), Cells(chargeMax, transColumn)) Range("J1").Select 'selecting cell R1C10 Selection.FormulaArray =...
  5. meghaAgrawal

    Count Distinct

    Following code counts something now. I realised count() is only for number or date values so I am using countA() now. But now the count is one extra. I think it has something to do with the column/list header. Range(Cells(rowMin, col), _ Cells(rowMax, col)).Select...
  6. meghaAgrawal

    Count Distinct

    Thanks PH for the quick reponse. I tried this function. It seems to count the number of rows within each group. And then it adds all rows in the end. My requirement is to count number of groups. For example: count(1,1,2,2,3,3,2) should give 3. right now subtotal gives something like this...
  7. meghaAgrawal

    Count Distinct

    I am using following code to get a distinct count of column values: Range(Cells(rowMin, col), _ Cells(rowMax, col)).Select ActiveWorkbook.Names.Add Name:="myName", RefersTo:="='" _ & ActiveSheet.Name & "'!" & Selection.Address Selection.AdvancedFilter Action:=xlFilterCopy...
  8. meghaAgrawal

    Count Distinct

    I have an Excel column. Is there a way I can count number of distinct values appearing in that column?
  9. meghaAgrawal

    File I/O

    2. When all logs will be written for the first time - the above mentioned loop will work. But what about finding next log candidate when all logs are created and they are full. Program wants to write more. It will loop back and make another cycle starting with the first log. In this case all log...
  10. meghaAgrawal

    File I/O

    Any generic text viewer should be able to open these log files. At least Notepad I would say. I had no idea that text viewer will put a limit on the file size.
  11. meghaAgrawal

    File I/O

    I am creating a log system where I will have say 5 log files named like <whatever>.1.log, <whatever>.2.log, ..., <whatever>.5.log I will start writing into first log and subsequent info gets appended into the log file till it is full to the capacity. Then I will open up second log and so on...
  12. meghaAgrawal

    Adding the cells of a column

    Perfect! That's what I was looking for - thank you very much!
  13. meghaAgrawal

    Adding the cells of a column

    Yes thats one solution. But I want to avoid the loop. Like how it happens in formula - where we can specify the cell range. The only problem is my cell range is determined at run time and I cannot harcode something like sum(A2:A8). Whatever I have is in variables.
  14. meghaAgrawal

    Adding the cells of a column

    I need to add a number of cells. They all are in the same column. I have row numbers and column number values stored in integer variables. I want to store their sum in a new variable, say total. Following does not work - please advise how should I do it total = SUM(cells(rowStart, col)...

Part and Inventory Search

Back
Top