Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
difference between range.text and range.value
Hi;
could somebody please explain the difference between rang.text and range.value? When should I use both? Chers Sean. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
difference between range.text and range.value
..text is read-only - .value is read-write
Cliff Edwards |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
difference between range.text and range.value
Chers, are there situations where I should use one and not the other?
Cheers Sean. "ward376" wrote in message ... .text is read-only - .value is read-write Cliff Edwards |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
difference between range.text and range.value
I never use .Text, and I don't think anyone in this group ever use it.
..Value can be used for all purposes. Regards, Per "Sean Farrow" skrev i meddelelsen ... Chers, are there situations where I should use one and not the other? Cheers Sean. "ward376" wrote in message ... .text is read-only - .value is read-write Cliff Edwards |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
difference between range.text and range.value
I haven't found any examples of different results when reading a cells
content with one or the other. The data types and characters returned have been the same in my experience. Really, the only difference I've ever found is that you can write with .value... Cliff Edwards |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
difference between range.text and range.value
See the help file example for the Text property of the Range object (put
text cursor on word Range, press F1, select Text from the Property drop down). -- Rick (MVP - Excel) "Sean Farrow" wrote in message ... Chers, are there situations where I should use one and not the other? Cheers Sean. "ward376" wrote in message ... .text is read-only - .value is read-write Cliff Edwards |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
difference between range.text and range.value
Also...
..Text is what is displayed in the cell and ..Value is actually what is contained in the cell except when it isn't. (.Formula and .Value2 are better choices sometimes) An example: the cell.Value is 1.23456 but the cell.Text is 1.23 because the cell is formatted as "0.00" -- Jim Cone Portland, Oregon USA "Sean Farrow" wrote in message Hi; could somebody please explain the difference between rang.text and range.value? When should I use both? Chers Sean. |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
difference between range.text and range.value
Much better explanation Jim - I almost exclusively work with extracted
data and hadn't come across the formatting issue when reading cell contents. Thanks! Cliff Edwards |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
difference between range.text and range.value
Range.Value returns the underlying value of a cell, regardless of how
that cell is formatted for output. Range.Text returns exactly what appears in the cell. For example, if A1 contains the number 987.1234 and is formatted for 2 decimal places, A1.Value would return 987.1234 while A1.Text would return 987.12. The Text property is read-only, so you cannot assign a value to it. It is the Value transformed by NumberFormat to display in the cell. Cordially, Chip Pearson Microsoft MVP Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Fri, 26 Dec 2008 20:55:54 -0000, "Sean Farrow" wrote: Hi; could somebody please explain the difference between rang.text and range.value? When should I use both? Chers Sean. |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
difference between range.text and range.value
Neither of those statements is true.
..Text has its own purpose and there are many in this newsgroup who use it effectively. Per Jessen wrote: I never use .Text, and I don't think anyone in this group ever use it. .Value can be used for all purposes. Regards, Per "Sean Farrow" skrev i meddelelsen ... Chers, are there situations where I should use one and not the other? Cheers Sean. "ward376" wrote in message ... .text is read-only - .value is read-write Cliff Edwards -- Dave Peterson |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
difference between range.text and range.value
I just found a difference (probably not a surprise to other
responders) but when reading cell values, range.text is limited to 1024 characters. Just had a cell with 6400+ characters (a distribution list) and the len of range.text was 1024! Used range.value to get the entire string into a variable. Cliff Edwards |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sum the difference in a range | Excel Worksheet Functions | |||
Date Range & Difference | Excel Worksheet Functions | |||
Find the POSITION IN A RANGE of text in a string that matches value(s) in a range | Excel Programming | |||
Range vs IRange What's the difference? | Excel Programming | |||
Difference between range.formula and range.formulalocal | Excel Programming |