I need to do a Distinct Count on order numbers. I have a table with order_id and line_id. What I need is the number of order with 1 line, 2 lines ect. I am at a loss on the distinct count of order_id.
order_id line_id
1001 1
1001 2
1001 3
1001 4
1002 1
1002 2
1003 1
1004 1
1004 2
1004 3
1004...
DaveInIowa,
I used your code and it works beautifully. Thank you and thanks to everyone else who weighed in. I don't think I could have done it without you.
I am trying to use Change Event to hide or unhide rows based on user input to a given cell. Here is what I have so far:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
Windows("Deal_checklists_v6_1.xls").Activate
Sheets("Deal Reg. Overall").Select...
I am trying to write vb to send several different mail messages with attachments. The issue I am running into, is if one of the recipients is taken out of the address book, then the code bombs when it hits that name. Is there a way to error check the names before sending out proceeding to...
I need to be able to find and open multiple workbooks each month. The workbooks will always be in the same folder and the name will always start with "EXP". I can find the files with the code below, I can't figure out how to open each file when it is found.
Private Sub CmdFndFile_Click()
Set...
I need to append the following cells into a single string
adding a single quote before and after each number and a comma separating them. I also need this to occur until it reaches the last row of data.
Row Col A
1 603339978
2 603339979
3 603339980
What I need in a...
I have a workbook is a download from the web, that has named sheets in it. The sheet name has been changed on some of the downloads, so I need to be able to find either sheet name. I am trying to do something like the statement below, but I am having trouble with the syntax.
If Sheets.name...
I am not sure if I am in the right forum or not. I am using Info SQL Designer and I am trying to do an if statement that checks if condition 1 and condition 2 are true. I have been using a decode statement, but I am unsure how to do this while testing more than one condition.
Any help you...
I did as was suggested and my code looks like this:
'Do comparative to replace old duplicate data
C = 2
lngLastRow = Workbooks("SEC DATABASE V2.xls").Worksheets("Balance_Sheet").Range("I65536").End(xlUp).Row
lngLastRow = lngLastRow + 1
Set wsBS =...
I am getting 'Run-time error 1004': Application-defined or object-defined error on:
Set myRange = Workbooks("SEC DATABASE V2.xls").Worksheets("BALANCE_SHEET").Range(Range("I1"), Range("I1").End(xlDown))
I am using VB6 in Excel to do a comparitive of two tables and copy if a vlookup value does not exist in the lookup array. I am using the following code, but the value keeps coming up false.
Dim vLookupValue
Dim C As Integer
Dim lngLastRow As Long
Workbooks.Open...
I am using VB6 in Excel to do a comparitive of two tables and copy if a vlookup value does not exist in the lookup array. I am using the following code, but the value keeps coming up false.
Dim vLookupValue
Dim C As Integer
Dim lngLastRow As Long
Workbooks.Open...
I am using the following 2 variables, which I need to reset on change of invoice number. But previous forces formula to evaluate whileprintingrecords, which prohibits me from grouping on the result. Is there any way around this?
1)
WhilePrintingRecords;
Global stringvar FirstDiv;
if...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.