i am currently working on a macro that will make an average number of days. my problem is that when the macro runs it works fine and does what is is supposed to but becuse some fields do not have numbers in it returns the #value! back in the output box. I need some way of getting rid of this, or changing the boxes without numbers to 0 automatically.
i have a small problem with a text box, its working fine, its on a seperate sheet to the one it passes the value to, its basically a quantity box, so the cell it passes the value to has a simple =I12*J12 formula in it, to multiply the quantity by the unit price, thus equalling the total priec of course. My problem comes if you change your mind, you put in the item, and the quantity, all works good, but if you want to delete the item you enter 0 or delete the value right? When i delete the value, the total cell brings back a #VALUE error, instead of 0, its almost like the text box is passing an invalid string to the quantity box, instead of nothing, if i manually delete the the value (even tho the cell is empty) from the linked cell, the #VALUE error goes away, any clues as to what the text box is passing that is causing hte error?
I'm trying to have it output certain symbols such as "Ó" and I can't quite figure out how to do it, i want it to basically write in the selected cell:
"Ó of " & a & "'s = " & b
where a and b are strings... my problem is i cant figure out how to have it output the sigma but keep the letters from going into symbol or windings...
I am working on a VBA routine that calc and verifies hash files for a series of folders and sub directories, using a command line prog called exactfile.exe (exactfile.com). It is very similar to M$'s FCIV utility, but it is actually supported on Win7/Win8. The issue I am having is that I cannot get the standard output/error/console stream to redirect to a text file. I've written the routine multiple ways, trying to figure out redirection. I was using this site
HTML Code:Â [URL]....
as a reference.
Here is my VBS approach. This code is dependent on another sub passing folder_name as a string
[Code] .....
The VBS then executes using wscript, however, since exf.exe does not return an exit code the same way FCIV.exe does, I need the results redirected to a text file. The results vary from a single line saying "No errors." or multiple lines indicating which files do not match their original hash.
Here are a couple iterations of my BAT approach, where i use the BAT to call the VBS. I really thought I would be able to use the standard redirect > here, since the executable is launched using cmd.exe, but I've not gotten the results I want.
[Code] .....
I've scoured more pages than I can count, but no approach seems to work, so far.
Need coding of command button to output text based on the contents of combobox1 and combobox2. The text should be placed in the next available cell starting in cell b3 for combobox1 and starting in cell c3 for combobox2. Each time submit is clicked the name and number associated with that name should go in the next free cell in the spreadsheet.
So for example the user choses name1 and number6 cell b3 would read name1 and cell c3 would read number6 after submit is clicked. The user then choses name58 and number12 and presses submit again cell b4 would read name58 and cell c4 would read number12.
I would like to output the text I perpared in " sheet 1" into a text file, "output.txt"
The imformation I like to output start from coulmn C, and column D then column E..... The numbers of rows in each column could be different, and also there may be some single empty column in between. The totals numbers of coulmn is unknow.
the text in the output.txt should contant all the imformation in the sheet started from column C, coulmn D, column F.... (if coulmn E is empty). and the text in the output.txt file is continues with no gap in it.
To make it even more powerful for later use, The column that begin with NOT should not be output.
After organizing my data I now need to export to a simple txt file. But I need to control to final format better then the simple "save as" allows. What I need is a simple list of in a single column, separated by a carriage return. I am working with a "small" list of addresses, and by small I mean 27,188.
Every format I try ends up with quotation marks and a strange box like symbol. What I have is a full name and 2 line address per field in .xlsx format. I also have the data separated into fields by line.
Is there any way to better control the output when exporting to a .txt file?
i am trying to create an Array that will print the stock number as a title on row A. e.g. "Stock 1" in A2 "Stock 2" in A3...etc. here is what i have attempted:
=SUBSTITUTE(A1) in cell 'A2' gives me: 1234567890 =ISTEXT(A2) in cell 'A3' gives me: TRUE
BUT, =A3+1 gives me: 1234567891
Hows that happening? Substitute function gives me the output which is a TEXT, and how is it that when I add 1 to it, I get an answer? Shouldn't I get a #VALUE! error instead?
I have a column with lots of tube station names. I have a look up table with the tube station name, and the possible lines that pass by that tube station.
One tube station may be covered by more than one tube line.
I am looking for a formula that will output every tube line that caters that one tube station.
first question, what is the best way to organise the data in my look up table. Second, is a vlookup the best formula to achieve the output I want? i.e. Reflect how many tube lines cover each station
see table below: If the station name has only one tube line, Vlookup works fine. When the station, such as Canno Street, has two tube lines, Vlookup only picks up one tube line. If I duplicate Cannot street under the station name, the Vlookup picks only one tube line.
LOOK UP TABLE A1 - station name B1 Tube line name Cannon Street District
[Code].....
Is there a formula that will output the data of the second tube line name in column D1?
I use excel to read in an ASCII data file in which every line beginning with H is a header line and lines beginning with S are data line.
I want excel to filter out the header lines and output the file with the data lines only then outputs these in a new file.
I also want it to read the values from column 72 to 75 and subtract 6 from them then output them again to the same new file.
Sub read() Open "d:/intouch/0502SPSS.LOG" For Input As #1 Dim i As Integer Dim lines(9999) As String i = 0 Do While Not EOF(1) Line Input #1, z i = i + 1 If Mid(z, 1, 1) = "H" Then i = i - 1
I have a spreadsheet with Approx 900 rows of information that has been entered incorrectly.
Spreadsheet has 6 columns. Contact Name Contact Number Company Name Company Account Number Order Date Order Numbers
Every Order should have its own line - However I have approx 900 rows where the order numbers have multiple entries instead of single entries.
All the order numbers end "LO" and there all 8 digits long.
I wanted to know if its possible to use excel to look for all instances of "LO" in the column Order Numbers and delete the original Row and replace it with 3 rows with the same information.
Example: Attached to this post!
I have 15 historic files each approx 35000 rows and I suspect there are more errors
Sometime it’s so hard to explain what it is you are having problems with, specially in the little title. I'm trying to write a formula which should be very simple but isn’t . The formula is in box F10 if B10 has anything in it and its going to have a mixture of text and numbers (first text then numbers) then it’s should equal to the value in the box C7. Here is the formula I wrote that doesn’t work.
I'm tying myself in knots when trying to combine logical formulas to return a text value based on multiple cell values.
Cell A1 can equal 1-10, and cell B1 can also contain the values 1-10.
I want C1 to display the text "YC" if B1 value is equal to 9 or 10. I want C1 to display the text "SC" if B1 value is 5-8, and A1 value is 4-10. Any other combination of values should return a blank cell.
I tried splitting this into two components before trying to make it fit into a single equation, and i can achieve the first condition of display "YC" =IF(AND(A1>=9,A1
I'm outputting some cells to a CSV. At first I tried using the SaveAs function but that renamed my worksheet and didn't work for ranges (as far as I know)
Sub Export() 'Set myADPFile = "C:ADPPCPWADPDATAPRSHWEPI.CSV" Dim myADPFile As String myADPFile = "C:PRSHWEPI.CSV" Dim x As Byte x = 5 Open myADPFile For Output As 1 While (Not (Sheet3.Range("A" & x).Value = NA)) Print #1, Trim(Sheet3.Range("B" & x).Value), ",", _ Trim(Sheet3.Range("C" & x).Value), ",", _ Sheet3.Range("D" & x).Value, ",", _ ..........................
The values are correct. However, the excess amount of spaces is not. Using the Write function just encases everything in quotation marks. Replacing spaces isn't a good solution because the first row MUST be in that format, and removing all spaces would require more code to put spaces back in. Is there a way to get rid of all the excess spaces surrounding each value?
As per title, I am trying to compare a column of text cells which contain "Yes" or are empty and a columns of numbers. If they are "Yes" and "1" on the same row, I want to output an "OK" message. Excel seems happy with the following code but it does not work and returns an empty cell if the two conditions are true.
Need macro to search xls files in folder/directory for common text string "see reference" and then output the file number which is located in cell A1 to new spreadsheet for each file the text "see reference" is found.
So what I am looking for is to put a macro behind button 1 which will do the following
Enter A Default Value Of 123 In The Yellow Boxes (B7:K7) If They Are Blank When The User Clicks The Button Performs A Search And Replace To Replace The Values 01-01-1990 With B8, 02-01-1990 With C8 Etc Until K8 Output The Contents Of Sheet 2 To A Text File (In XAI Format) In The Following Order A1:A100, B1:B100, C1:C100
Excel 2010, I have the following list (showing part of it):
Name T-Shirt Sizes Nathan S
[Code]....
The aim of the list is to see what Sizes each and every person needs and then count how many T-Shirts are required for that particular size. The list is over a 100 entries long so counting it manually isn't really an option as it's time consuming as well as errors might arise.
Thus, I've been trying to use the IF statement with the following logic but to as no avail
IF Size in Column is XS Add 1 to a particular Cell IF Size in Colum is S Add 1 to a particular Different Cell
and so on for the other sizes...kind of like a counter for a for-do-loop.
I have a simple spreadsheet of an inventory. Each row on this spreadsheet represents the data related to an item. I would like for a user to be able to INPUT a serial number via a userform. Then, I would like for the program to OUTPUT some information about that particular item (a few cells that should be on the same row as the serial number).
I attached an image diagram that may better represent what I am trying to do.
I'm using Excel 2003 and I'm trying to make my LINEST function and the source cells for a scatter graph use the cell range specified in another cell in the document. I figured out that it was simple to do the following:
But I can't figure out how to do this in a larger function. I've tried a few things but none of them work. Here is an example where I want it to do a LINEST with y values in cells Ja - Jb and x values in cells Ia - Ib (where a and b are integers specified in cells I250 and J250 respectively):
How do I pass values between procedures? I have two command buttons in the worksheet.
If I have a procedure A that asks user to input a value "x", when a command button is pressed. Then another command button is pressed that passes the value onto another procedure B, which iterates a msgbox as many times as the number x,
How do I pass that value x from one procedure to another?
I am building a tool that uses Pivot Tables (so I can't use track changes) and I have found cool code that will insert timestamp and username in the comment when a change occurs. But I need to modify the code to also take the old value and put it into the comment as well. Here is the code to register the change into the comment:
I'd like to know how to send a different value to a cell based on what is selected in the combobox. Like a vlookup, but from within the box. Something like :
I think this is a relatively easy issue, but I don't know how to do it. I call the Sub SortRange in another Sub SortDeliver. A range (ran5) is defined in Sub SortRange that I also need to use in Sub SortDeliver. How do I pass the range or get the second sub to recognize the range?
I've a userform (UserForm1) that on closing will open one of 5 other userforms. Which of the userforms that opens will be determined at runtime, depending on an option a user has previously selected. The name of the userform is held in a cell in a workbook and is opened as follows:
where the value in Sheets("Sheet1").Range("A1") is "UserForm3"
UserForm1 contains TextBox1. How can I pass the value in TextBox1 to a textbox in UserForm3 when the name of UserForm3 is held as a variable in a cell in a worksheet?
Option Base 1 Dim Covariance(1 To 5, 1 To 5) As Double Dim Mean(1 To 5) As Double Dim Portfolio(1 To 10, 1 To 2, 1 To 5) As Double Dim PortfolioValues(1 To 10, 1 To 2) As Double
And my main function:
Function Generate_Portfolio_Values()
Dim a As Integer, b As Integer, c As Integer Dim m As Integer