Using Excel 2003 and trying to insert a formula into a cell but can't get the concatenation right in the VB Editor.
This is the formula I want to be inserted:
=IF(Sheet1!A1="","",Sheet1!A1)
My current code:
ActiveCell.Formula= _
"=IF(Sheet1'A1=," & "" & "," & "" & "," & "Sheet1!A1)"
Thanks.
I neglected to post that using the code above, the first of these reports displays just fine, with the HTML formatting intact, in the body of the email message. But, the second will not display.
Any other ideas? Thanks.
I'm stumped. I have nine separate html files which I paste into the body of an e-mail message in Outlook. File No. 1 is pasted first, then a carriage return, then I type a line of "=" across the page, then paste File No. 2 below. I continue until all nine files have been pasted.
I am trying...
Using Workbooks.Open to open five external Excel files and import the data from the individual files. The code works just fine for data files A-D but crashes on file E and displays Run-time error 1004.
The only difference I can find is the size of File E. Files A-D are from 53KB to 291KB in...
PHV or Leslie,
In the above example, I should only have one set of records. If there is data for any one function, the data should be displayed. If there is not data for a function, zero should be displayed. Not both.
Any suggestions?
Thanks.
In the above example, I should only have one set of records. If there is data for any one function, the data should be displayed. If there is not data for a function, zero should be displayed. Not both.
Thanks.
Almost there, PHV!
Now I'm getting a Function F2B, F4, and OTHER for each OFFICE, but I'm also getting a set of three I guess Null entries for each OFFICE.
FINANCE NO OFFICE MGR YRWK FUNCTION WKHRS OTHRS
361392 Off X 0 F2B 0 0
361392 Off X 0...
That's almost it, PHV!
Now I'm getting a Function F2B, F4, and OTHER for each OFFICE, but I'm also getting a set of three I guess Null entries for each OFFICE.
FINANCE NO OFFICE MGR YRWK FUNCTION WKHRS OTHRS
361392 Off X 0 F2B 0 0
361392 Off X 0...
I'm stumped! Trying to return all offices from the [tbl OFFICE DATA] table for Mgr. 0, for all three of the F2B, F4, and OTHER categories, even if null.
No matter what I try, I can't get the results I want. Below is SQL code.
SELECT [tbl OFFICE DATA].[FINANCE NO], [tbl OFFICE DATA].OFFICE...
Thanks for the response Leslie. But, I still must have something wrong. Following is my altered code but it is still not returning Unit 364124, which exists in the [OFFICE DATA] table, not in the [ACTL EXPENSE DATA] table.
SELECT [tbl OFFICE DATA].[UNIT NO], [tbl ACTL EXPENSE DATA].ITEM_NO...
Trying to return Unit No. 364124 with zeroes for quantity and amount but it will not show up in query results.
Any suggestions? Thanks.
SELECT [tbl OFFICE DATA].[UNIT NO], [tbl ACTL EXPENSE DATA].ITEM_NO, Sum(Nz([QUANTITY],0)) AS [ACTL QTY], Sum(Nz([EXT_PRICE],0)) AS [ACTL AMT]
FROM [tbl ACTL...
PHV, thanks for the response.
I changed the join to a Left Join as you suggested but now I get a data type mismatch error message. I checked and the joined fields are identical (they are all text).
The "tbl EMPLOYEE DATA" table has a "YRDAYWK" field and the value of the field is identical for every record in the table.
I want to use that field value as the criteria for the lookup to find the corresponding record in the
"[tbl DATES].[YRDAYWK]" field to return the "WEEK" field value...
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.