Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default validation problem

hi
i have thre columns of which at least one should contain some text
how do i validate such condition?
thanks

--
hemu
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default validation problem

Try:
=LEN(A1)+LEN(B1)+LEN(C1)0

HTH
--
AP

"Hemant_india" a écrit dans le
message de news: ...
hi
i have thre columns of which at least one should contain some text
how do i validate such condition?
thanks

--
hemu



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default validation problem

thanks Ardus
but the condition is such that
i must validate through...
Data------validation---------
and i am using
"if validation=true" in vba code to check each cells value


--
hemu


"Ardus Petus" wrote:

Try:
=LEN(A1)+LEN(B1)+LEN(C1)0

HTH
--
AP

"Hemant_india" a écrit dans le
message de news: ...
hi
i have thre columns of which at least one should contain some text
how do i validate such condition?
thanks

--
hemu




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default validation problem

i'm at loss Ardus
a1 refers to the first cell in column "a"
how will it validate second cell in column "a"
sorry
but please help
--
hemu


"Ardus Petus" wrote:

You can use my formula as validation formula!

--
AP

"Hemant_india" a écrit dans le
message de news: ...
thanks Ardus
but the condition is such that
i must validate through...
Data------validation---------
and i am using
"if validation=true" in vba code to check each cells value


--
hemu


"Ardus Petus" wrote:

Try:
=LEN(A1)+LEN(B1)+LEN(C1)0

HTH
--
AP

"Hemant_india" a écrit dans le
message de news:
...
hi
i have thre columns of which at least one should contain some text
how do i validate such condition?
thanks

--
hemu








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default validation problem

I've noticed that for most validation tasks, the Data Validation... feature
just doesn't cut it -- it's simply not powerful and flexible enough.

But if you're looking at the validation result in VBA anyways, why don't you
perform the validation programmatically as well? In VBA it's more or less a
no-brainer. Is there some kind of odd user requirement that forces you to use
Data Validation rather than a proper programming language?

Cheers,
/MP

"Hemant_india" wrote:

thanks Ardus
but the condition is such that
i must validate through...
Data------validation---------
and i am using
"if validation=true" in vba code to check each cells value


--
hemu


"Ardus Petus" wrote:

Try:
=LEN(A1)+LEN(B1)+LEN(C1)0

HTH
--
AP

"Hemant_india" a écrit dans le
message de news: ...
hi
i have thre columns of which at least one should contain some text
how do i validate such condition?
thanks

--
hemu




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default validation problem

Data validation doesn't force a user to make an entry - it only restricts
what can be entered. You are basically asking to format all cells except
the 3 in question with data validation that will not allow entry unless one
of the cells in question has an entry. This can be checked with

=counta(A1,A2,B3)0

for example, but still doesn't force an entry - but if applied to all other
cells would prevent entry until it is met.

--
Regards,
Tom Ogilvy

"Hemant_india" wrote in message
...
hi
i have thre columns of which at least one should contain some text
how do i validate such condition?
thanks

--
hemu



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default validation problem

hi mat
i've more than 40 columns to validate in three sheets
with at least 6500 records in all
also every column stores diffrent values
validating evry clumn through vba is u know what it is
--
hemu


"Mat P:son" wrote:

I've noticed that for most validation tasks, the Data Validation... feature
just doesn't cut it -- it's simply not powerful and flexible enough.

But if you're looking at the validation result in VBA anyways, why don't you
perform the validation programmatically as well? In VBA it's more or less a
no-brainer. Is there some kind of odd user requirement that forces you to use
Data Validation rather than a proper programming language?

Cheers,
/MP

"Hemant_india" wrote:

thanks Ardus
but the condition is such that
i must validate through...
Data------validation---------
and i am using
"if validation=true" in vba code to check each cells value


--
hemu


"Ardus Petus" wrote:

Try:
=LEN(A1)+LEN(B1)+LEN(C1)0

HTH
--
AP

"Hemant_india" a écrit dans le
message de news: ...
hi
i have thre columns of which at least one should contain some text
how do i validate such condition?
thanks

--
hemu



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default validation problem

hi tom
see the following code
With rng
For n = 1 To trow - 1
For h = 1 To tcell
rng.Cells(n + 1, h).Select
Debug.Print Cells(n + 1, h).Value
With Selection
If .Validation.Value = False Then
.Interior.ColorIndex = 16
errcount = errcount + 1
Else: .Interior.ColorIndex = 0
End If
using your solution it did not worked
please help
--
hemu


"Tom Ogilvy" wrote:

Data validation doesn't force a user to make an entry - it only restricts
what can be entered. You are basically asking to format all cells except
the 3 in question with data validation that will not allow entry unless one
of the cells in question has an entry. This can be checked with

=counta(A1,A2,B3)0

for example, but still doesn't force an entry - but if applied to all other
cells would prevent entry until it is met.

--
Regards,
Tom Ogilvy

"Hemant_india" wrote in message
...
hi
i have thre columns of which at least one should contain some text
how do i validate such condition?
thanks

--
hemu






  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default validation problem

That doesn't have anything to do with my suggestion. Obviously you have
misinterpreted what I said. If you are going to use code, you wouldn't need
to use data validation at all.

--
Regards,
Tom Ogilvy

"Hemant_india" wrote in message
...
hi tom
see the following code
With rng
For n = 1 To trow - 1
For h = 1 To tcell
rng.Cells(n + 1, h).Select
Debug.Print Cells(n + 1, h).Value
With Selection
If .Validation.Value = False Then
.Interior.ColorIndex = 16
errcount = errcount + 1
Else: .Interior.ColorIndex = 0
End If
using your solution it did not worked
please help
--
hemu


"Tom Ogilvy" wrote:

Data validation doesn't force a user to make an entry - it only

restricts
what can be entered. You are basically asking to format all cells

except
the 3 in question with data validation that will not allow entry unless

one
of the cells in question has an entry. This can be checked with

=counta(A1,A2,B3)0

for example, but still doesn't force an entry - but if applied to all

other
cells would prevent entry until it is met.

--
Regards,
Tom Ogilvy

"Hemant_india" wrote in message
...
hi
i have thre columns of which at least one should contain some text
how do i validate such condition?
thanks

--
hemu






  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default validation problem

hi tom
that's ok
regards

--
hemu


"Tom Ogilvy" wrote:

That doesn't have anything to do with my suggestion. Obviously you have
misinterpreted what I said. If you are going to use code, you wouldn't need
to use data validation at all.

--
Regards,
Tom Ogilvy

"Hemant_india" wrote in message
...
hi tom
see the following code
With rng
For n = 1 To trow - 1
For h = 1 To tcell
rng.Cells(n + 1, h).Select
Debug.Print Cells(n + 1, h).Value
With Selection
If .Validation.Value = False Then
.Interior.ColorIndex = 16
errcount = errcount + 1
Else: .Interior.ColorIndex = 0
End If
using your solution it did not worked
please help
--
hemu


"Tom Ogilvy" wrote:

Data validation doesn't force a user to make an entry - it only

restricts
what can be entered. You are basically asking to format all cells

except
the 3 in question with data validation that will not allow entry unless

one
of the cells in question has an entry. This can be checked with

=counta(A1,A2,B3)0

for example, but still doesn't force an entry - but if applied to all

other
cells would prevent entry until it is met.

--
Regards,
Tom Ogilvy

"Hemant_india" wrote in message
...
hi
i have thre columns of which at least one should contain some text
how do i validate such condition?
thanks

--
hemu






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
Validation problem. Petter Excel Worksheet Functions 3 December 19th 07 03:13 PM
validation problem Petter Excel Worksheet Functions 0 December 19th 07 02:06 PM
Validation problem Petter Excel Worksheet Functions 0 December 19th 07 02:00 PM
Validation problem... BeSmart Excel Worksheet Functions 3 July 7th 05 02:22 AM
Validation problem GMet Excel Programming 3 October 7th 04 02:30 AM


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