Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
jesmin
 
Posts: n/a
Default Strange Prob with Worksheet name


Hi The
In my workbook, name of 2 worksheets are a_data & a_report. I am
getting correct result when I am using the following in another trial
sheet:
Sheets("Sheet2").Cells(1,1).Formula="=SUMIF(Sheet1 !A:A,0,Sheet1!B:B)".

But when I am using my original workbook code with the original name as
follows, its giving run-time error.:
Sheets("a_report").Cells(1,1).Formula="=SUMIF(a_da
ta!A:A,0,a_data!B:B)"

--why the reference creating problem when I am chanhging just the sheet
name from Shee1 to a_data.
Thanks in advance.


--
jesmin
------------------------------------------------------------------------
jesmin's Profile: http://www.excelforum.com/member.php...o&userid=29540
View this thread: http://www.excelforum.com/showthread...hreadid=508357

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Strange Prob with Worksheet name

Your code worked ok for me when I had two sheets named a_data and a_report.

But if the names were different (leading/trailing spaces), then it didn't work.

Just a guess. Does that underscore really mean an underscore--or is a way of
showing a space character.

If you really have "a data" and "a report", try:

Sheets("a report").Cells(1, 1).Formula = "=SUMIF('a data'!A:A,0,'a data'!B:B)"

In fact, those extra apostrophes in the formula won't matter to excel if you
don't actually need them.

If that's not it, try renaming the sheet one more time. And be careful with
those leading/trailing spaces.

jesmin wrote:

Hi The
In my workbook, name of 2 worksheets are a_data & a_report. I am
getting correct result when I am using the following in another trial
sheet:
Sheets("Sheet2").Cells(1,1).Formula="=SUMIF(Sheet1 !A:A,0,Sheet1!B:B)".

But when I am using my original workbook code with the original name as
follows, its giving run-time error.:
Sheets("a_report").Cells(1,1).Formula="=SUMIF(a_da
ta!A:A,0,a_data!B:B)"

--why the reference creating problem when I am chanhging just the sheet
name from Shee1 to a_data.
Thanks in advance.

--
jesmin
------------------------------------------------------------------------
jesmin's Profile: http://www.excelforum.com/member.php...o&userid=29540
View this thread: http://www.excelforum.com/showthread...hreadid=508357


--

Dave Peterson
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
Protect Workbook vs Worksheet?? Dan B Excel Worksheet Functions 3 November 7th 05 09:02 PM
Inserting Filtered RC cell information into other worksheets Dennis Excel Discussion (Misc queries) 10 July 30th 05 01:54 AM
Search/Match between 2 x separate Worksheets and populate result in third worksheet Alan Bartley Excel Discussion (Misc queries) 1 April 11th 05 05:21 AM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
copyright and worksheet protection dow Excel Discussion (Misc queries) 2 January 3rd 05 03:07 PM


All times are GMT +1. The time now is 01:42 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"