From Jerrys solution:
The first suggestion I've tried is Jerry's, everything works out fine with one exception.
How can I apply the alias or column header (Total sales) to this calculation M1+M2+M3+M4+M5 as the header is not in the original input file.
What is the correct syntax for this line...
Hi Jerry,
I tried your suggestion but I get an error thats telling me the file is already open.
As well, I had to put a # sign in front of ReadFileNo & WriteFileNo.
Any ideas on how I can get rid of the error thanks!
Hello to all,
I have a text file with customers names and their purchases over a 5 month period.
It would look like similar to whats below:
"Name", "M1", "M2", "M3", "M4", "M5"
"Harry Jones", 250, 300, 450, 100, 250
"Henny Penny", 100, 200, 150, 300, 250
"Tom Mack", 110, 320, 150, 345, 430...
Hello all,
I took a quick scan thru the archives but didnt see anything relating to what I'm trying to do. So I decided to post here.
I'm trying to export text from a word document using VBA to Excel. I tried running a macro but it didnt quite give me what I wanted.
I'd like to be able to...
Hello,
I'm trying to use VBA code via a button click sub procedure in MS word 2000 to highlight text that has just been replaced via a find & replace.
I used a Macro just to see the syntax for highlighted text and got the following:
<code>
Selection.Range.HighlightColorIndex = wdYellow...
After some quick researching I found this code to delete unused cells:
Sub DeleteUnused()
Dim myLastRow As Long
Dim myLastCol As Long
Dim wks As Worksheet
Dim dummyRng As Range
For Each wks In ActiveWorkbook.Worksheets
With wks
myLastRow = 0
myLastCol = 0
Set dummyRng =...
Is there a way to clear out the formatted cells beneath my "real" data area.
Ive tried clearing contents, deleting all the columns, is there anything ele I can do uisng VBA?
Zathras,
I tried your suggestion and that seems to have worked. What its also done is reveal that it puts the #NUM! all the way down to row 28,727 even tho there is no visble data down that far.
This tells me obviously theres some formatting "behind the scenes" that I need to get rid of...
PHV I just tried your suggestion, but I'm still getting that error. Like I said it executes the code and places the correct values in the spreadsheet but that error still pops up.
On to the next suggestion...
One question though rmikesmith,
I'm using VBA to code for this worksheet function, however after I execute my code, it places the values as I have stated in my code but I get an error that says:
"Run time error '1004'
Unable to get the Large property of the worksheetfunction class."
Is there...
Is there a function to find the 2nd highest value amongst a range of values?
I have 4 columns, labeled: A, B, C, D.
If I take the Max value of those 4 columns, then subtract the max from each of the individual columns then the lowest resulting value is the 2nd highest.
Is there an easier way...
I'm wondering if I could have some help in trying to set up this procedure to subtract 2 cells and then divide.
The code is as follows:
Dim rngLastcell As Integer
With Sheets("affy data")
For z = 2 To rngLastcell
'(L2-N2)/K2
Cells(z, "O").Value = .Range("L" & _ z).Value - .Range("N" &...
I found this simple line of code that moves the cursor to the just outisde the last row & last column.
Excel.Selection.SpecialCells(11).Select
I guess what I need to do now is find a way to return that position as a variable and then feed that into my FOR loop.
Hmm...
To skip:
I'd like it to work on my entire recordset regardless of how big or small the recordset is. Right now it uses a confined FOR loop. It goes through records 2 to 16384.
I'd like my code to be "smart" enough to execute the If statements regardless of how big or small the dataset is...
I'm not sure whether to post this as a seperate thread, however there is one more question I have regarding this code snippet, I'd like to be able to execute this code no matter how many records I have.
Right now I use a FOR NEXT Loop but I enter how many records I have manually.
With...
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.