Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calculating values with macro between worksheets

I Have the following problem: I wanted to calculate value "as" to th
column A in worksheet "Horizon_Measurements". When i try like below
the code stucks i this row and appears notification of typo error. Bu
if i keep on the same worksheet and calculate values to the column A
everything works fine, what stucks? How i should refer to the column
in sheet "Horizon_Measurements"


'This is not working

If LCase(Cells(SB, "H").Value) = "as" Then
Cells(SB, "Horizon_Measurements!A:A").Value = "SB203"

'This works

ElseIf LCase(Cells(SB, "H").Value) = "hts" Then
Cells(SB, "AB").Value = "SB501

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Calculating values with macro between worksheets

spolk,

Change

Cells(SB, "Horizon_Measurements!A:A").Value = "SB203"

to

Worksheets("Horizon_Measurements").Cells(SB, "A").Value = "SB203"

HTH,
Bernie
MS Excel MVP

"spolk " wrote in message
...
I Have the following problem: I wanted to calculate value "as" to the
column A in worksheet "Horizon_Measurements". When i try like below,
the code stucks i this row and appears notification of typo error. But
if i keep on the same worksheet and calculate values to the column AB
everything works fine, what stucks? How i should refer to the column A
in sheet "Horizon_Measurements"


'This is not working

If LCase(Cells(SB, "H").Value) = "as" Then
Cells(SB, "Horizon_Measurements!A:A").Value = "SB203"

'This works

ElseIf LCase(Cells(SB, "H").Value) = "hts" Then
Cells(SB, "AB").Value = "SB501"


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calculating values with macro between worksheets

Thanks Bernie! this works and again going forward toward ne
obstacles..

--
Message posted from http://www.ExcelForum.com

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
Macro to copy & paste-special-values data to selected worksheets tomhelle Excel Discussion (Misc queries) 1 May 5th 10 02:00 PM
calculate values in an unlimited range of cells in a column WITHOUTalso calculating values that had previously been filtered AGAINST? yadang Excel Discussion (Misc queries) 2 October 1st 09 06:18 PM
Macro to Create Worksheets Based on Cell Values Lilbit Excel Worksheet Functions 3 March 24th 08 05:39 PM
Excel VBA Macro to compare 2 worksheets for same values [email protected] Excel Worksheet Functions 0 August 23rd 06 04:35 PM
Calculating across worksheets Steiner Excel Discussion (Misc queries) 5 August 11th 05 02:46 PM


All times are GMT +1. The time now is 10:46 PM.

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

About Us

"It's about Microsoft Excel"