Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default simple ? problem with value or/of formula ?


Hi,
I made the following code, i want to check the values of 2 colums
when column 27 colum 26 a macro will be started
it works oke when i use typed in values
BUT when i put formulas in both colums i.g "=B25" or so
then i wont work, who has some help

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 26 Then Exit Sub
If Target.Column 27 Then Exit Sub

(there is something wrong in the next line, when using formulas in th
sheet)
If Cells(Target.Row, 27) Cells(Target.Row, 26) Then

macro

End If

End Su

--
pim_parr
-----------------------------------------------------------------------
pim_parra's Profile: http://www.msusenet.com/member.php?userid=41
View this thread: http://www.msusenet.com/t-186940767

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default simple ? problem with value or/of formula ?

Hi,
It works for me.

If I put a formula in , say =B25 (in a row in col 26) and =A34 (in the
corresponding row in col 27), then if A34=20 and b25 = 5 then mcro will
execute as col 26=5 and col 27=20.

The formulas e.g = B25 will be evaluated to a number or text. Check the
formulas give sensible results i.e. comparing numbers with numbers.

Can you give an example of your data?


HTH

MS 2003

"pim_parra" wrote:


Hi,
I made the following code, i want to check the values of 2 colums
when column 27 colum 26 a macro will be started
it works oke when i use typed in values
BUT when i put formulas in both colums i.g "=B25" or so
then i wont work, who has some help

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 26 Then Exit Sub
If Target.Column 27 Then Exit Sub

(there is something wrong in the next line, when using formulas in the
sheet)
If Cells(Target.Row, 27) Cells(Target.Row, 26) Then

macro

End If

End Sub


--
pim_parra
------------------------------------------------------------------------
pim_parra's Profile: http://www.msusenet.com/member.php?userid=418
View this thread: http://www.msusenet.com/t-1869407674


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
Problem with a simple formula ChristiW26 Excel Discussion (Misc queries) 8 November 13th 09 09:44 PM
Having problem with 'if' in what should be a simple formula Meenie Excel Worksheet Functions 6 February 12th 09 01:40 PM
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 04:51 PM
simple formula problem Bob Bedford Excel Discussion (Misc queries) 4 February 24th 06 10:58 AM
Simple (?) Formula Problem Phil Hageman[_3_] Excel Programming 1 December 8th 03 07:14 PM


All times are GMT +1. The time now is 02:24 AM.

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"