Re: $$Excel-Macros$$ Can I get the day of the week (e.g. Friday) from the date already encoded in a string?

2012-06-30 Thread tangledweb
] *On Behalf Of *tangledweb *Sent:* Tuesday, June 26, 2012 8:47 PM *To:* excel-macros@googlegroups.com *Subject:* $$Excel-Macros$$ Can I get the day of the week (e.g. Friday) from the date already encoded in a string? If I already have Sheets(RawData).Cells(count, BarDate).Text having

Re: $$Excel-Macros$$ Re: Can I get the day of the week (e.g. Friday) from the date already encoded in a string?

2012-06-28 Thread tangledweb
Thanks Asa and belatedly Noorain. The format function worked and as it happens the other method was returning the wrong day for all those who might use it. The .value2 does not seem to be necessary but I left it anyway. On Wednesday, June 27, 2012 10:09:16 PM UTC-7, tangledweb wrote: Asa

$$Excel-Macros$$ Re: Can I get the day of the week (e.g. Friday) from the date already encoded in a string?

2012-06-27 Thread tangledweb
out of range but worked fine with the alias. On Tuesday, June 26, 2012 8:47:02 PM UTC-7, tangledweb wrote: If I already have Sheets(RawData).Cells(count, BarDate).Text having a value like 6/26/2012 is there a way to get the day of the week as a number or string for that date that does

$$Excel-Macros$$ Can I get the day of the week (e.g. Friday) from the date already encoded in a string?

2012-06-26 Thread tangledweb
If I already have Sheets(RawData).Cells(count, BarDate).Text having a value like 6/26/2012 is there a way to get the day of the week as a number or string for that date that does not require splitting it into its parts and feeding them to some function? If the latter the .net examples I found

$$Excel-Macros$$ Re: Can I get the day of the week (e.g. Friday) from the date already encoded in a string?

2012-06-26 Thread tangledweb
:08 PM UTC-7, Lalit_Mohan wrote: Hi, You can try this =TEXT(DAY(A1),) Hope it helps you Regards, Lalit Mohan On Wednesday, 27 June 2012 09:17:02 UTC+5:30, tangledweb wrote: If I already have Sheets(RawData).Cells(count, BarDate).Text having a value like 6/26/2012

$$Excel-Macros$$ Re: Can I get the day of the week (e.g. Friday) from the date already encoded in a string?

2012-06-26 Thread tangledweb
to be what it wants. On Tuesday, June 26, 2012 9:30:29 PM UTC-7, Lalit_Mohan wrote: Hi, You can try this Evaluate(=TEXT(DAY(A1),)) Hope it helps you Regards, Lalit Mohan On Wednesday, 27 June 2012 09:45:46 UTC+5:30, tangledweb wrote: This seems to be designed to work

$$Excel-Macros$$ Can a pointer or similar be set to one array or another depending on condition to reduce tests?

2012-04-22 Thread tangledweb
If I have 2 identical sized arrays and if a condition is true then I want to always get values from one array and if the condition false from the other array, can some pointer be set to handle this using one array name and not test for every assignment if true or false? all arrays below

$$Excel-Macros$$ What is left behind when you clear or delete cell contents that still affects usedrange?

2012-04-18 Thread tangledweb
I am doing many tests on columns of date pasted into a sheet. Sometimes more rows, sometimes less. It is important that I be able to define the working range as just what has data in it. However when I use clear or delete on the usedrange or currentregion or any other way to define it

$$Excel-Macros$$ watch does not break and can filling spreadsheet be made to scroll?

2012-04-16 Thread tangledweb
I set a watch with maxrow=111 and set to break if true.Program runs and in the watch window shows maxrow=111though also some odd message about out of context but it does not break. Program runs to the end. Thoughts? Also while the program is running it is filliing in several

$$Excel-Macros$$ function call return parameter always zero

2012-04-15 Thread tangledweb
I assume this has to do with the assignment being to a variable that is passed into the function, but if so is there something more elegant than using a temporary copy for the maxrow value passed in or making it global? The function needs to know the value of maxrow on entry and needs to

$$Excel-Macros$$ Ok I know I should be getting this by now but why does this assignment not work?

2012-04-14 Thread tangledweb
This works With Sheets(RawData) Set tmprange = .Range(.Cells(2, BarOpen), .Cells(stoprawdata, EContango)) End With but this which seems equivalent to me does not work Set tmprange = Sheets(RawData).Range(.Cells(2, BarOpen), .Cells(stoprawdata, EContango)) which gives

$$Excel-Macros$$ Program written, compiles, but odd runtime error in setting a range pointer

2012-04-14 Thread tangledweb
Program has already by error time successfully called 3 procedures doing all the initialization work across 3 different sheets. But then... application defined or object defined error This has already successfully executed With Sheets(RawData) Set tmprange = .Range(.Cells(2,

$$Excel-Macros$$ redim preserve seems to only allow columns increase which is backwards

2012-04-11 Thread tangledweb
I want to use an array to store values as more efficient that doing it cell by cell, then copy the entire array into the sheet range when done. But the size of the array not know initially. I do know that number of columns, but not the number of rows. So I will have to do some redim

$$Excel-Macros$$ Argh. Previously posted evaluate function replacing loop has unnoticed major error

2012-04-11 Thread tangledweb
I used the evaluate function below to replace the commented out loop portion for better performance in rounding off all the cells in a range. It was certainly fast and it performed the round function correctly but it also replaced every single cell in the range with the value of the first cell

$$Excel-Macros$$ Could this loop be replaced by some range method?

2012-04-08 Thread tangledweb
I am trying to get more used to using ranges instead of addressing individual cells by indexes. The loop below is rounding off the entries in all the columns where BarOpen for example is just the column index in the sheet. Is there a way to do this more efficiently by using the used range

$$Excel-Macros$$ If you put a userform on a sheet is that part of the usedrange?

2012-04-08 Thread tangledweb
I would like to have a userform on a data sheet for setting parameters and controls. But if that useform is considered part of the range by the usedrange function then I will have to put it on a separate sheet which would be something of a pain. -- FORUM RULES (986+ members already BANNED for

$$Excel-Macros$$ runtime error on assignment trying to find the end of a column. Seems like should be simple.

2012-04-07 Thread tangledweb
Sigh, the things I know I don't know are increasing faster than the things I know. I get a 1004 error on the assignment to stoprowdata below. Sheets(RawData) has been used successfully before so I do not think that is wrong. So I assume the problem is in the rest of the statement. But if so

$$Excel-Macros$$ Why is usedrange here returning the entire spreadsheet?

2012-04-07 Thread tangledweb
This statement is returning 99 though I deleted everthing below the actual data to make sure no cells below it were used stoprawdata = Sheets(RawData).UsedRange.Rows.Count - 1 -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor

$$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-05 Thread tangledweb
Before running a program that puts the results onto a sheet I want to clear that sheet from the previous run. Easy to just clear a huge range, but really wanted to do it right and clear the used range. I tried to find a way to use the usedrange value but could not determine how to exclude the

$$Excel-Macros$$ How do you find all the properties or methods of an object?

2012-04-05 Thread tangledweb
If I want to find all the properties (if that is the correct word) for an object how do I do it? Excel help just gives simple examples. In the ones I wanted intellisense did not help. Right mouse on the word gave an option to list all properties and methods but when clicked nothing happened.

$$Excel-Macros$$ Difficulty referencing non active sheet but this must be possible

2012-03-27 Thread tangledweb
I have one sheet of raw data with several columns and thousands of rows. I need to process this and I wanted to put the results on a separate sheet with several columns and dozens of rows when done. I saw some example code where it seemed you could do this as long as you qualified the sheet

$$Excel-Macros$$ Re: Is there a way to tell excel the first row is definitely data and not column names?

2012-03-26 Thread tangledweb
it is wanting to treat it as data)? On Saturday, March 24, 2012 9:46:29 AM UTC-7, tangledweb wrote: Excel keeps wanting to override me and make row 1 be column headers but in a particular case I need it to be just data. Any way to force this? -- FORUM RULES (986+ members already BANNED

$$Excel-Macros$$ Re: So is it common for even an easy question on the forum to not get answered?

2012-03-26 Thread tangledweb
Thanks, that works. On Friday, March 23, 2012 12:41:57 AM UTC-7, Asa R. wrote: Hi H., Not sure how you are determining that Excel knows or doesn't know your column headings are column headings. Do you mean it guesses correctly when you go to sort your data whether you have headings or

Re: $$Excel-Macros$$ Re: Is there a way to tell excel the first row is definitely data and not column names?

2012-03-26 Thread tangledweb
Well, I see it does know so never mind. On Monday, March 26, 2012 8:21:06 PM UTC-7, tangledweb wrote: If I reply to that address, how does it know which thread to attach to? On Mon, Mar 26, 2012 at 8:10 PM, Domain Admin domainqu...@gmail.com wrote: Thanks again. Will try

$$Excel-Macros$$ Is there a way to tell excel the first row is definitely data and not column names?

2012-03-24 Thread tangledweb
Excel keeps wanting to override me and make row 1 be column headers but in a particular case I need it to be just data. Any way to force this? -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need

$$Excel-Macros$$ Re: So is it common for even an easy question on the forum to not get answered?

2012-03-23 Thread tangledweb
I determine it by sorting the column. If the first row is left out of the sort then it is treating it as a header. You say you can override excel on this. How is that done? On Friday, March 23, 2012 12:41:57 AM UTC-7, Asa R. wrote: Hi H., Not sure how you are determining that Excel

$$Excel-Macros$$ Re: So is it common for even an easy question on the forum to not get answered?

2012-03-23 Thread tangledweb
I determine it by sorting the column. If the first row is left out of the sort then it is treating it as a header. You say you can override excel on this. How is that done? On Friday, March 23, 2012 12:41:57 AM UTC-7, Asa R. wrote: Hi H., Not sure how you are determining that Excel knows

$$Excel-Macros$$ Re: Need help with VBAfor Excel naming and using column names for looping

2012-03-22 Thread tangledweb
Asa, I tried what you said but am doing something wrong. First when I used the exact same string as both the Set variable and the Match variable it said it needed an object. It did not like identical names I guess? Then I created different object names and that would compile but I have tried

$$Excel-Macros$$ Asa R. I tried what you said for the column addressing but I can not make it work. Can you assist?

2012-03-22 Thread tangledweb
Asa, I tried what you said but am doing something wrong. First when I used the exact same string as both the Set variable and the Match variable it said it needed an object. It did not like identical names I guess? Then I created different object names and that would compile but I have tried

$$Excel-Macros$$ Re: Asa R. I tried what you said for the column addressing but I can not make it work. Can you assist?

2012-03-22 Thread tangledweb
First before I forget, thanks again for the help. Maybe I need to go find a more comprehensive book. The one I have does not mention the Set command, does not list Range as a data type, does not mention tables (which may be useful but that is too ambitious at this point). From the other

$$Excel-Macros$$ How does excel know the first row is column names and not data?

2012-03-20 Thread tangledweb
Excel does a very good job of knowing row 1 is column names even if the data type is the same for the entire column. But it is not always correct. If I insert columns of numbers then insert a new row1 and put in text headers it considers them column names even if the entire column is set to

$$Excel-Macros$$ Need help with VBAfor Excel naming and using column names for looping

2012-03-18 Thread tangledweb
I am trying to understand how to name a column of data and be able to reference the data by that name. Ideally I could set the name programatically but if it needs to be done through the ribbon command that is acceptable. Ideally inserting a new column before the named column will not affect that