Wow, Brad, looks great. Why did you neglect constants? Would it be hard to have this work on them too, because I would like it to be able to. Could we add something like:
else cel.Formula = "=ROUNDDOWN(" & IDunnoWhatToPutHere & "," & i & ")
I want to add the text "rounddown(" to the beginning and the text ",3)" to the end of the current formula in the cell (no quotes obviosly), for every cell I have highlighted, no matter what the current formula in the cell is.
...the cell and not just entering what I change it do. The is what the recorder gives me, which is pretty much useless:
Sub Macro1()
ActiveCell.FormulaR1C1 = "=ROUNDDOWN(3.12545,2)"
Range("E8").Select
ActiveCell.FormulaR1C1 = "=ROUNDDOWN(R[-3]C*R[-2]C,3)"
Range("E9").Select
End Sub
I need to write a macro that will modify the fomula in the highlighted cells.
Cell B2: =4.325112
Cell C2: =A1*A2
I'd like to highlight cells B2 and C2 run the macro, the macro asks me to input an integer, and then the forumals in the highlighted range are modified as follows:
Cell B2...
I'd like to have a array with names in it, like 'Blue' and 'White' and 'Green'. Then I want to be able to create scalar variables from within some loops like:
$AWhiteBig
$BWhiteBig
$AWhiteSmall
$BWhiteSmall
$ABlueBig
$BBlueBig
etc.....
The loops I don't have a problem with. But how do I...
I want to do something like this...
%jason = (
red => ((//^one/ and /two/) or (/^three/ and /four/)),
green => ((//^five/ and /six) or (/^seven/ and /eight/))
);
foreach $key ( keys %jason ) {
if $jason{$key} {
do_stuff
}
}
but that doesn't work...how do I get this...
Yeah, I know that. What's I'm saying is that when you write with Spreadsheet::WriteExcel it makes the file huge. Then you open and save it in Excel and the files size reduces by A LOT.
So I write a .xls using Spreadsheet::WriteExcel::Big and it's 25-MB. Then I open and save it, and it's under 500-KB.
Wassup with that? Can I get perl to write the file in this more compact format?
Thanks,
Jason
OK...som preogress...I had been running the script from within the EngInSite Perl Editor and I kept getting all the errors. Now, I tried to run the script from the command prompt in cygwin...and it worked.
Can anybody explain what my problem is?
So I installed the Spreadsheet::WriteExcel module from CPAN. I ran the script in the FAQ to show me which modules are installed, and it listed the Spreadsheet modules. When I try to the module, however, it doesn't work. I get this error message:
Can't locate Spreadsheet/WriteExcel.pm in...
I got it! It hit me last night. I am such an idiot. I guess this is what happens when you don't write any code for 10 years.
For some reason I was stuck on working with the data as numbers, since it is all numbers. But then it hit me that I should just work with it as text. So I have one...
How can I switch the cloumns and rows of a tab delimited text file?
I can't use an array of arrays or anything like that because there is a LOT of data in the file and it takes forever that way. I was think read a row, write it to the output file, then read a row from the input file, and add...
Wow, now that's a thurough explanation. Thanks for your time. I'm worried though that this hash may get too large for my computer memory. Should I be worried?
I have a text file. 1 column, all numbers. I want to read the number on each row into an array. Isn't there some simple way to do it without a counter? something lie @myarray = <>; or something?
What if there were two column in the data files, and the first way the key value.
Thanks for...
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.