#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 139
Default range.value changes

I have a range("e7").value in a function and it gets 1108, but then when it
goes to another function to get the same range - its does not, it got 35449
instead. Why is that? This used to work until I changed it from 1008 to
1108. This is set to text with the '1108 as such in the file.
--
Tina
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default range.value changes

It would be helpful is you post the code that is causing the problem.
The value 35449 looks suspiciously like a serial date.

Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Wed, 3 Dec 2008 12:25:50 -0800, Tina
wrote:

I have a range("e7").value in a function and it gets 1108, but then when it
goes to another function to get the same range - its does not, it got 35449
instead. Why is that? This used to work until I changed it from 1008 to
1108. This is set to text with the '1108 as such in the file.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default range.value changes

Tina,

This isn't clear. You refer to Range("E7") being used in a function.
Functions must be in a general module so if the range is qualified

sheets("Sheet1").Range("E7")

it will return the E7 value from the activesheet. Can you post your code.

Mike

"Tina" wrote:

I have a range("e7").value in a function and it gets 1108, but then when it
goes to another function to get the same range - its does not, it got 35449
instead. Why is that? This used to work until I changed it from 1008 to
1108. This is set to text with the '1108 as such in the file.
--
Tina

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default range.value changes

I think you have a typo...

sheets("Sheet1").Range("E7")

it will return the E7 value from the activesheet.


That line will return the value from Sheet1 and not the active sheet. As a
guess you are on the correct track though. My guess is that Range("E7") is an
unqualified range in tina's code so it pulls from the active sheet when what
Tina probably wants is for the value to come frm a specific sheet...
--
HTH...

Jim Thomlinson


"Mike H" wrote:

Tina,

This isn't clear. You refer to Range("E7") being used in a function.
Functions must be in a general module so if the range is qualified

sheets("Sheet1").Range("E7")

it will return the E7 value from the activesheet. Can you post your code.

Mike

"Tina" wrote:

I have a range("e7").value in a function and it gets 1108, but then when it
goes to another function to get the same range - its does not, it got 35449
instead. Why is that? This used to work until I changed it from 1008 to
1108. This is set to text with the '1108 as such in the file.
--
Tina

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default range.value changes

That's what I meant but clearly didn't express it properly, my guess remains
that the OP is using unqualified range references in a function and picking
up unexpected values:)

"Jim Thomlinson" wrote:

I think you have a typo...

sheets("Sheet1").Range("E7")

it will return the E7 value from the activesheet.


That line will return the value from Sheet1 and not the active sheet. As a
guess you are on the correct track though. My guess is that Range("E7") is an
unqualified range in tina's code so it pulls from the active sheet when what
Tina probably wants is for the value to come frm a specific sheet...
--
HTH...

Jim Thomlinson


"Mike H" wrote:

Tina,

This isn't clear. You refer to Range("E7") being used in a function.
Functions must be in a general module so if the range is qualified

sheets("Sheet1").Range("E7")

it will return the E7 value from the activesheet. Can you post your code.

Mike

"Tina" wrote:

I have a range("e7").value in a function and it gets 1108, but then when it
goes to another function to get the same range - its does not, it got 35449
instead. Why is that? This used to work until I changed it from 1008 to
1108. This is set to text with the '1108 as such in the file.
--
Tina

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
formula to sort a range so that it matches the exact rows of a column that is outside that range? steveo Excel Discussion (Misc queries) 1 June 18th 06 02:05 AM
How to count dates within a certain range in a column with mutiple date range entries Krisjhn Excel Worksheet Functions 2 September 1st 05 01:59 PM


All times are GMT +1. The time now is 05:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"