ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   validation problem (https://www.excelbanter.com/excel-programming/362967-validation-problem.html)

Hemant_india[_2_]

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

--
hemu

Ardus Petus

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




Hemant_india[_2_]

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





Ardus Petus

validation problem
 
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







Hemant_india[_2_]

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







Ardus Petus

validation problem
 
Forget it: I tried my solution, but it does not work (never produces an
error!)

Sorry,
--
AP

"Hemant_india" a écrit dans le
message de news: ...
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









Mat P:son[_2_]

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





Tom Ogilvy

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




Hemant_india[_2_]

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




Hemant_india[_2_]

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





Tom Ogilvy

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







Hemant_india[_2_]

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








All times are GMT +1. The time now is 08:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com