LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Query for Array !!!

Here comes a Question,Hope someone has done it before.

Scenario :- This macro is doing checking the Range of 1 lac rows by putting into an array and marking the last column as wrong if any negative entry comes in any column,This would be done for all rows one by one(Ya by Array),

What to achieve as always i want to remove this if condition and making this macro a effective one,Ya question comes how?, This can be possible when this macro check all the columns for a single row in one time not one by one cell value, I have seen evaluate function works in these kind of scenario where you need to work with output only.

something like Evaluate(Min(Lbound(Varout,2),ubound(varout,2)) <0 then mark wrong in column G !!,I am not sure how evaluate works here but any help would be appreciated basically i want to see the logics of different minds.

1) I can do it with the help of helper column but i don't

Sub Array1()


Dim varout() As Variant
varout = Range("A1:K100000")

t = Timer
temp = 0
ReDim Preserve varout(1 To 100000, 1 To 13)

For i = LBound(varout) To UBound(varout)
For j = LBound(varout, 2) To UBound(varout, 2)
'Debug.Print varout(i, j)
If varout(i, j) < 0 Then
Sheets("sheet1").Range("L" & i).Value = "wrong"
End If
Next
' MsgBox temp
Next

MsgBox Timer - t
End Sub
 
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
Web Query Results to an Array Raul Excel Programming 0 November 6th 08 04:12 PM
ARRAY QUERY JingleRock Excel Programming 4 September 23rd 07 04:42 PM
Array data in SQL Query? mazzarin Excel Programming 4 June 26th 06 08:07 PM
Web Query & Array Questions! gr8guy Excel Programming 1 August 25th 04 11:05 PM
Query for data in an array anonymous Excel Programming 2 January 13th 04 12:51 PM


All times are GMT +1. The time now is 08:24 PM.

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

About Us

"It's about Microsoft Excel"