View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
gti_jobert[_12_] gti_jobert[_12_] is offline
external usenet poster
 
Posts: 1
Default Dynamic Seach Values


Hi all,

I was wondering if it was possible to do something like the following;


Code:
--------------------

If Cells(r, 7).Value < "" & GBM Then

'code is equal to DT Code
Code = Cells(r, 7).Value

'add to find total DT
Data(Code + 2, i) = Data(Code + 2, i) + Cells(r, 8).Value

End If

--------------------


Where GBM is equal to;


Code:
--------------------

If GroupMachine = "All" Then

GBM = ""

Else

GBM = " And Cells(r, 3) = GroupMachine"

End If

--------------------


Its for dynamic search criteria within a spreadsheet. the above could
would work if it was in SQL but doesn't seem to add the GMB string to
the end of my statement.

Any suggestions?


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=510051