Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Macro is not able to identify the value.


Hi All,

I have created the below mentioned loop which return me TRUE or FALSE Value
in a cell.
Do Until ActiveCell.Offset(0, -11).Value = ""
ActiveCell.FormulaR1C1 = "=ISERROR(VLOOKUP(RC[-12],'[" & Dname & "]Data
Base'!R2C1:R20000C1,1,0))"
ActiveCell.Offset(1, 0).Select
Loop

After that I have below mentioned code but the macro is not able to detect
the cell value as true or false.(In If function) I am not able to understand
what is going wrong with the coding.

Do Until ActiveCell.Value = ""
If ActiveCell.Value = "TRUE" Then
'Here I have my code.
End if
Loop
Heera
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Macro is not able to identify the value.

Use TEXT instead of value. You also looping on the same cell which will
produce an endless loop.

Do Until ActiveCell.Value = ""
If ActiveCell.Text = "TRUE" Then
'Here I have my code.
End if
Loop


"Heera" wrote:


Hi All,

I have created the below mentioned loop which return me TRUE or FALSE Value
in a cell.
Do Until ActiveCell.Offset(0, -11).Value = ""
ActiveCell.FormulaR1C1 = "=ISERROR(VLOOKUP(RC[-12],'[" & Dname & "]Data
Base'!R2C1:R20000C1,1,0))"
ActiveCell.Offset(1, 0).Select
Loop

After that I have below mentioned code but the macro is not able to detect
the cell value as true or false.(In If function) I am not able to understand
what is going wrong with the coding.

Do Until ActiveCell.Value = ""
If ActiveCell.Value = "TRUE" Then
'Here I have my code.
End if
Loop
Heera

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Macro is not able to identify the value.

"TRUE" with quote marks is a string of characters that just *looks* like
TRUE, but it is not the value TRUE. Just remove the quote marks in your
test...

If ActiveCell.Value = True Then

--
Rick (MVP - Excel)


"Heera" wrote in message
...

Hi All,

I have created the below mentioned loop which return me TRUE or FALSE
Value
in a cell.
Do Until ActiveCell.Offset(0, -11).Value = ""
ActiveCell.FormulaR1C1 = "=ISERROR(VLOOKUP(RC[-12],'[" & Dname & "]Data
Base'!R2C1:R20000C1,1,0))"
ActiveCell.Offset(1, 0).Select
Loop

After that I have below mentioned code but the macro is not able to detect
the cell value as true or false.(In If function) I am not able to
understand
what is going wrong with the coding.

Do Until ActiveCell.Value = ""
If ActiveCell.Value = "TRUE" Then
'Here I have my code.
End if
Loop
Heera


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Macro is not able to identify the value.

Thank you Rick and Joel

Both of your's codes worked fine.

Regards
Heera
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 identify columns to hide Joanne Excel Programming 6 July 10th 07 02:02 AM
how to identify the control that ran a macro? Andy Warner Excel Programming 5 April 20th 06 03:07 PM
Macro to identify bad dates Sandeman[_13_] Excel Programming 3 March 23rd 06 02:34 PM
Macro to identify year within a date smitty24 Excel Programming 1 March 4th 06 08:36 PM
How do you identify if a worksheet is in the last position in a Macro? Natasha[_2_] Excel Programming 2 August 8th 03 03:32 AM


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