Search Results

Search found 45581 results on 1824 pages for 'value objects'.

Page 12/1824 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • django template find value within list

    - by dotty
    Hay, how do i find a value with in python list in django's template system? example list = [1,2,3,4,5,6,7] x = 1 if x is in list: return u'found!' else: return u'not found' endif: Something along those lines. any help would be great

    Read the article

  • Have macro 'return' a value

    - by bobobobo
    I'm using a macro and I think it works fine - #define CStrNullLastNL(str) {char* nl=strrchr(str,'\n'); if(nl){*nl=0;}} So it works to zero out the last newline in a string, really its used to chop off the linebreak when it gets left on by fgets. So, I'm wondering if I can "return" a value from the macro, so it can be called like func( CStrNullLastNL( cstr ) ) ; Or will I have to write a function

    Read the article

  • Implement DDD and drawing the line between the an Entity and value object

    - by William
    I am implementing an EMR project. I would like to apply a DDD based approach to the problem. I have identified the "Patient" as being the core object of the system. I understand Patient would be an entity object as well as an aggregrate. I have also identified that every patient must have a "Doctor" and "Medical Records". The medical records would encompass Labs, XRays, Encounter.... I believe those would be entity objects as well. Let us take a Encounter for example. My implementation currently has a few fields as "String" properties, which are the complaint, assessment and plan. The other items necessary for an Encounter are vitals. I have implemented vitals as a value object. Given that it will be necessary to retrieve vitals without haveing to retrieve each Encounter then do vitals become part of the Encounter aggregate and patient aggregrate. I am assuming I could view the Encounter as an aggregrate, because other items are spwaned from the Encounter like prescriptions, lab orders, xrays. Is approach right that I am taking in identifying my entities and aggregates. In the case of vitals, they are specific to a patient, but outside of that there is not any other identity associated with them.

    Read the article

  • BroadcastReceiver not reading stored value from SharedPreferences

    - by bobby123
    In my app I have a broadcast receiver that turns on GPS upon receiving a set string of text. In the onLocationChanged method, I want to pass the GPS data and a value from my shared preferences to a thread in a string. I have the thread writing to log and can see all the GPS values in the string but the last value from my shared preferences is just showing up as 'prefPhoneNum' which I initialised the string to at the beginning of the receiver class. I have the same code to read the prefPhoneNum from shared preferences in the main class and it works there, can anyone see what I might be doing wrong? public class SmsReceiver extends BroadcastReceiver implements LocationListener { LocationManager lm; LocationListener loc; public SharedPreferences sharedpreferences; public static final String US = "usersettings"; public String prefPhoneNum = "prefPhoneNum"; @Override public void onReceive(Context context, Intent intent) { sharedpreferences = context.getSharedPreferences(US, Context.MODE_PRIVATE); prefPhoneNum = sharedpreferences.getString("prefPhoneNum" , ""); lm = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE); loc = new SmsReceiver(); //---get the SMS message passed in--- Bundle bundle = intent.getExtras(); SmsMessage[] msgs = null; String str = ""; if (bundle != null) { //---retrieve the SMS message received--- Object[] pdus = (Object[]) bundle.get("pdus"); msgs = new SmsMessage[pdus.length]; for (int i=0; i<msgs.length; i++) { msgs[i] = SmsMessage.createFromPdu((byte[])pdus[i]); str += msgs[i].getMessageBody().toString() + "\n"; } Toast.makeText(context, str, Toast.LENGTH_SHORT).show(); //Display SMS if ((msgs[0].getMessageBody().toString().equals("Enable")) || (msgs[0].getMessageBody().toString().equals("enable"))) { enableGPS(); } else { /* Do Nothing*/ } } } public void enableGPS() { //new CountDownTimer(10000, 1000) { //10 seconds new CountDownTimer(300000, 1000) { //300 secs = 5 mins public void onTick(long millisUntilFinished) { lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, loc); } public void onFinish() { lm.removeUpdates(loc); } }.start(); } @Override public void onLocationChanged(Location location) { String s = ""; s += location.getLatitude() + "\n"; s += location.getLongitude() + "\n"; s += location.getAltitude() + "\n"; s += location.getAccuracy() + "\n" + prefPhoneNum; Thread cThread = new Thread(new SocketsClient(s)); cThread.start(); } @Override public void onProviderDisabled(String provider) { } @Override public void onProviderEnabled(String provider) { } @Override public void onStatusChanged(String provider, int status, Bundle extras) { } } Here is the logcat for when the application shuts - D/LocationManager( 3912): requestLocationUpdates: provider = gps, listener = accel.working.TrackGPS@4628bce0 D/GpsLocationProvider( 96): setMinTime 0 D/GpsLocationProvider( 96): startNavigating D/GpsLocationProvider( 96): TTFF: 3227 D/AndroidRuntime( 3912): Shutting down VM W/dalvikvm( 3912): threadid=1: thread exiting with uncaught exception (group=0x400259f8) E/AndroidRuntime( 3912): FATAL EXCEPTION: main E/AndroidRuntime( 3912): java.lang.NullPointerException E/AndroidRuntime( 3912): at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:146) E/AndroidRuntime( 3912): at accel.working.TrackGPS.onLocationChanged(TrackGPS.java:63) E/AndroidRuntime( 3912): at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:191) E/AndroidRuntime( 3912): at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:124) E/AndroidRuntime( 3912): at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:140) E/AndroidRuntime( 3912): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 3912): at android.os.Looper.loop(Looper.java:144) E/AndroidRuntime( 3912): at android.app.ActivityThread.main(ActivityThread.java:4937) E/AndroidRuntime( 3912): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 3912): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 3912): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) E/AndroidRuntime( 3912): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) E/AndroidRuntime( 3912): at dalvik.system.NativeStart.main(Native Method)

    Read the article

  • How to marshal an object and its content (also objects)

    - by Waldo Spek
    I have a question for which I suspect the answer is a bit complex. At this moment I am programming a DLL (class library) in C#. This DLL uses a 3rd party library and therefore deals with 3rd party objects of which I do not have the source code. Now I am planning to create another DLL, which is going to be used in a later stadium in my application. This second DLL should use the 3rd party objects (with corresponding object states) created by the first DLL. Luckily the 3rd party objects extend the MarshalByRefObject class. I can marshal the objects using System.Runtime.Remoting.Marshal(...). I then serialize the objects using a BinaryFormatter and store the objects as a byte[] array. All goes well. I can deserialize and unmarshal in a the opposite way and end up with my original 3rd party objects...so it appears... Nevertheless, when calling methods on my 3rd party deserialized objects I get object internal exceptions. Normally these methods return other 3rd party objects, but (obviously - I guess) now these objects are missing because they weren't serialized. Now my global question: how would I go about marshalling/serializing all the objects which my 3rd party objects reference...and cascade down the "reference tree" to obtain a full and complete serialized object? Right now my guess is to preprocess: obtain all the objects and build my own custom object and serialize it. But I'm hoping there is some other way...

    Read the article

  • Getting stored procedure's return value with iBatis.NET

    - by MikeWyatt
    How can I retrieve the return value of a stored procedure using iBatis.NET? The below code successfully calls the stored procedure, but the QueryForObject<int> call returns 0. SqlMap <procedure id="MyProc" parameterMap="MyProcParameters" resultClass="int"> MyProc </procedure> <parameterMap id="MyProcParameters"> <parameter property="num"/> </parameterMap> C# code public int RunMyProc( string num ) { return QueryForObject < int > ( "MyProc", new Hashtable { { "num", num } } ); } Stored Procedure create procedure MyProc @num nvarchar(512) as begin return convert(int, @num) end FYI, I'm using iBatis 1.6.1.0, .NET 3.5, and SQL Server 2008.

    Read the article

  • How to assign the array key a value, when the key name is itself a variable

    - by Matrym
    How do I identify an item in a hash array if the key of the array is only known within a variable? For example: var key = "myKey"; var array = {myKey: 1, anotherKey: 2}; alert(array.key); Also, how would I assign a value to that key, having identified it with the variable? This is, of course, assuming that I must use the variable key to identify which item in the array to alert. Thanks in advance!

    Read the article

  • .Net friendly, local, key-value pair, replicatable datastore

    - by Brad Mathews
    I am looking for a key/value type datastore with very specific requirements. Anyone know anything that will work? Needs to be a component of some sort. No additional installation needed. The datastore needs to be on the local hard drive. I am using VB.Net for a desktop app running Windows XP through 7 so it needs to callable by that environment. It needs to replicatable. If I have four copies of my app running on the network, each local copy of the datastore needs to replicate with the others. As close to real time as possible. The first three are easy, I can do that with ADO.Net out of the box. The last one, replication, is the one I do not have answer to. Does such an animal exist? Thanks, Brad

    Read the article

  • Throwing exception vs returning null value with switch statement

    - by Greg
    So I have function that formats a date to coerce to given enum DateType{CURRENT, START, END} what would be the best way to handling return value with cases that use switch statement public static String format(Date date, DateType datetype) { ..validation checks switch(datetype){ case CURRENT:{ return getFormattedDate(date, "yyyy-MM-dd hh:mm:ss"); } ... default:throw new ("Something strange happend"); } } OR throw excpetion at the end public static String format(Date date, DateType datetype) { ..validation checks switch(datetype){ case CURRENT:{ return getFormattedDate(date, "yyyy-MM-dd hh:mm:ss"); } ... } //It will never reach here, just to make compiler happy throw new IllegalArgumentException("Something strange happend"); } OR return null public static String format(Date date, DateType datetype) { ..validation checks switch(datetype){ case CURRENT:{ return getFormattedDate(date, "yyyy-MM-dd hh:mm:ss"); } ... } return null; } What would be the best practice here ? Also all the enum values will be handled in the case statement

    Read the article

  • Return value from ajax call?

    - by Dan
    Hi, I'm making a basic ajax function in jquery which echoes the number of rows found in a MySQL Query. function checkEventIDClass(id) { var params = 'method=checkEventIDClash&table=test&id=' + id; $.ajax({ type: "POST", url: "ajax.php", data: params, success: function(result){ return result; } }); } Is it possible to use this returned value in another function? I have tried but only get undefined values. In this situation, it will be acceptable to use synchronous calls. Any advice appreciated. Thanks

    Read the article

  • Entity-attribute-value model using codeigniter / php

    - by John Stewart
    SO I am trying to create a way to structure my database to be able customize forms. I looked into EAV pattern and here is my db structure: Table form - form_id - form_name - form_added_on - form_modified_at Table: form_fields - field_id - form_id - field_type (TEXT, RADIO etc..) - field_default_value - field_required Table: form_data - data_id - field_id - form_id - field_value so now I can store any custom form into the database and if I want to get the values for an individual form I can simply join it by "form_id" .. the problem: I want to be able to search through all the forms for a specific field value. How can I do that with EAV model? Also, I thought about just storing the custom data as a serialized (JSON) object but then I am not sure how can I query that data. Please note that I am using Codeigniter with MYSQL. So if conversation can use Codeigniter libraries if needed.

    Read the article

  • flex checkbox value not selected from database

    - by Vish
    Hi, I have a small flex datagrid. The dataProvider is an xmlList. I have two columns, userList and user permissions. The user permissions column as checkboxes. The values for the checkbox are stored as 0 and 1 in mySQL. While returning it from PHP, I am converting them to true or false. Its returning the values correctly to the frontend. But inside the itemrenderer, the checkbox is not being set to true or false. Either everything is true or everything is false. Here is my code. http://www.freeimagehosting.net/uploads/4ba76933d3.gif How can I correctly set the value of the checkboxes from the DB values? Please help.

    Read the article

  • Get drop down menu value on Jqery

    - by Jerry
    Hi all Got a simple question. I would like to get a drop down menu value when a use clicks it. I tried to write the code on my own, but couldn't do it. Any helps would be appreciated. My Jquery $("#week").change(function(){ var input=$("week: select").val(); alert(input); //display undefiend My Html <form id="week"> <select> <option>Week 1</option> <option>Week 2</option> <option>Week 3</option> <option>Week 4</option> <option>Week 5</option> </select> </form>

    Read the article

  • Store return value of function in reference C++

    - by Ruud v A
    Is it valid to store the return value of an object in a reference? class A { ... }; A myFunction() { A myObject; return A; } //myObject goes out of scope here void mySecondFunction() { A& mySecondObject = myFunction(); } Is it possible to do this in order to avoid copying myObject to mySecondObject? myObject is not needed anymore and should be exactly the same as mySecondObject so it would in theory be faster just to pass ownership of the object from one object to another. (This is also possible using boost shared pointer but that has the overhead of the shared pointer.) Thanks in advance.

    Read the article

  • PHP Value Object auto create

    - by JonoB
    Assume that I have a class value object defined in php, where each variable in the class is defined. Something like: class UserVO { public $id; public $name; } I now have a function in another class, which is expecting an array ($data). function save_user($data) { //run code to save the user } How do I tell php that the $data parameter should be typed as a UserVO? I could then have code completion to do something like: $something = $data->id; //typed as UserVO.id $else = $data->name; //typed as UserVO.name I'm guessing something like the following, but this obviously doesnt work $my_var = $data as new userVO();

    Read the article

  • Value cannot be null in sportstore exampe

    - by Naim
    Hi everyone, I am having this problem when I want to implement IoC for sportstore example. The code public WindsorControllerFactory(){ container = new WindsorContainer( new XmlInterpreter(new ConfigResource("castle")) ); var controllerTypes= from t in Assembly.GetExecutingAssembly().GetTypes() where typeof(IController).IsAssignableFrom(t) select t; foreach (Type t in controllerTypes) container.AddComponentLifeStyle(t.FullName, t, LifestyleType.Transient); } protected override IController GetControllerInstance(Type controllerType) { return (IController)container.Resolve(controllerType); } } The error said that the value cannot be null in the GetControllerInstance Any help will be appreciated ! Thanks! Naim

    Read the article

  • Returning std::vector by value

    - by deft_code
    It is oft said that in C++11 it is sane to return std::vector by value. In C++03 this was mostly true as RVO should optimize away the copy. But that should scared most developers away. In C++11 will a returned std::vector local variable always be moved? What if that vector is a member of a local variable instead of a local variable itself? Obviously returning a global variable will not be moved. What other cases will it not be moved?

    Read the article

  • c# getting value from other form

    - by djuzla123
    Situation i have: textbox(to input your name) on form1. From that form1 on button click i go to form2. From form2 button click to form3. On form3 on button click i need to writte me in empty textbox value from textbox on form1 that user wrote down. example: on form1 in textbox1 i write my name "Djuzla". When i go to form3 and click button to see what name i wrote in form1 it should show in empty textbox3 form3 "Djuzla". I'm stuck with this few hours now, and it stupid problem but i have no idea what to do next.. tried all from zillion theards on net :p

    Read the article

  • Behind ASP.NET MVC Mock Objects

    - by imran_ku07
       Introduction:           I think this sentence now become very familiar to ASP.NET MVC developers that "ASP.NET MVC is designed with testability in mind". But what ASP.NET MVC team did for making applications build with ASP.NET MVC become easily testable? Understanding this is also very important because it gives you some help when designing custom classes. So in this article i will discuss some abstract classes provided by ASP.NET MVC team for the various ASP.NET intrinsic objects, including HttpContext, HttpRequest, and HttpResponse for making these objects as testable. I will also discuss that why it is hard and difficult to test ASP.NET Web Forms.      Description:           Starting from Classic ASP to ASP.NET MVC, ASP.NET Intrinsic objects is extensively used in all form of web application. They provide information about Request, Response, Server, Application and so on. But ASP.NET MVC uses these intrinsic objects in some abstract manner. The reason for this abstraction is to make your application testable. So let see the abstraction.           As we know that ASP.NET MVC uses the same runtime engine as ASP.NET Web Form uses, therefore the first receiver of the request after IIS and aspnet_filter.dll is aspnet_isapi.dll. This will start the application domain. With the application domain up and running, ASP.NET does some initialization and after some initialization it will call Application_Start if it is defined. Then the normal HTTP pipeline event handlers will be executed including both HTTP Modules and global.asax event handlers. One of the HTTP Module is registered by ASP.NET MVC is UrlRoutingModule. The purpose of this module is to match a route defined in global.asax. Every matched route must have IRouteHandler. In default case this is MvcRouteHandler which is responsible for determining the HTTP Handler which returns MvcHandler (which is derived from IHttpHandler). In simple words, Route has MvcRouteHandler which returns MvcHandler which is the IHttpHandler of current request. In between HTTP pipeline events the handler of ASP.NET MVC, MvcHandler.ProcessRequest will be executed and shown as given below,          void IHttpHandler.ProcessRequest(HttpContext context)          {                    this.ProcessRequest(context);          }          protected virtual void ProcessRequest(HttpContext context)          {                    // HttpContextWrapper inherits from HttpContextBase                    HttpContextBase ctxBase = new HttpContextWrapper(context);                    this.ProcessRequest(ctxBase);          }          protected internal virtual void ProcessRequest(HttpContextBase ctxBase)          {                    . . .          }             HttpContextBase is the base class. HttpContextWrapper inherits from HttpContextBase, which is the parent class that include information about a single HTTP request. This is what ASP.NET MVC team did, just wrap old instrinsic HttpContext into HttpContextWrapper object and provide opportunity for other framework to provide their own implementation of HttpContextBase. For example           public class MockHttpContext : HttpContextBase          {                    . . .          }                     As you can see, it is very easy to create your own HttpContext. That's what did the third party mock frameworks like TypeMock, Moq, RhinoMocks, or NMock2 to provide their own implementation of ASP.NET instrinsic objects classes.           The key point to note here is the types of ASP.NET instrinsic objects. In ASP.NET Web Form and ASP.NET MVC. For example in ASP.NET Web Form the type of Request object is HttpRequest (which is sealed) and in ASP.NET MVC the type of Request object is HttpRequestBase. This is one of the reason that makes test in ASP.NET WebForm is difficult. because their is no base class and the HttpRequest class is sealed, therefore it cannot act as a base class to others. On the other side ASP.NET MVC always uses a base class to give a chance to third parties and unit test frameworks to create thier own implementation ASP.NET instrinsic object.           Therefore we can say that in ASP.NET MVC, instrinsic objects are of type base classes (for example HttpContextBase) .Actually these base classes had it's own implementation of same interface as the intrinsic objects it abstracts. It includes only virtual members which simply throws an exception. ASP.NET MVC also provides the corresponding wrapper classes (for example, HttpRequestWrapper) which provides a concrete implementation of the base classes in the form of ASP.NET intrinsic object. Other wrapper classes may be defined by third parties in the form of a mock object for testing purpose.           So we can say that a Request object in ASP.NET MVC may be HttpRequestWrapper or may be MockRequestWrapper(assuming that MockRequestWrapper class is used for testing purpose). Here is list of ASP.NET instrinsic and their implementation in ASP.NET MVC in the form of base and wrapper classes. Base Class Wrapper Class ASP.NET Intrinsic Object Description HttpApplicationStateBase HttpApplicationStateWrapper Application HttpApplicationStateBase abstracts the intrinsic Application object HttpBrowserCapabilitiesBase HttpBrowserCapabilitiesWrapper HttpBrowserCapabilities HttpBrowserCapabilitiesBase abstracts the HttpBrowserCapabilities class HttpCachePolicyBase HttpCachePolicyWrapper HttpCachePolicy HttpCachePolicyBase abstracts the HttpCachePolicy class HttpContextBase HttpContextWrapper HttpContext HttpContextBase abstracts the intrinsic HttpContext object HttpFileCollectionBase HttpFileCollectionWrapper HttpFileCollection HttpFileCollectionBase abstracts the HttpFileCollection class HttpPostedFileBase HttpPostedFileWrapper HttpPostedFile HttpPostedFileBase abstracts the HttpPostedFile class HttpRequestBase HttpRequestWrapper Request HttpRequestBase abstracts the intrinsic Request object HttpResponseBase HttpResponseWrapper Response HttpResponseBase abstracts the intrinsic Response object HttpServerUtilityBase HttpServerUtilityWrapper Server HttpServerUtilityBase abstracts the intrinsic Server object HttpSessionStateBase HttpSessionStateWrapper Session HttpSessionStateBase abstracts the intrinsic Session object HttpStaticObjectsCollectionBase HttpStaticObjectsCollectionWrapper HttpStaticObjectsCollection HttpStaticObjectsCollectionBase abstracts the HttpStaticObjectsCollection class      Summary:           ASP.NET MVC provides a set of abstract classes for ASP.NET instrinsic objects in the form of base classes, allowing someone to create their own implementation. In addition, ASP.NET MVC also provide set of concrete classes in the form of wrapper classes. This design really makes application easier to test and even application may replace concrete implementation with thier own implementation, which makes ASP.NET MVC very flexable.

    Read the article

  • Best in-memory cache of DB objects for Silverlight [closed]

    - by Jon
    Hi, I'd like to set up a cache of database objects (i.e. rows in a table) in memory in silverlight, which I'll do using WCF and linq-to-sql. Once I have the objects in memory, I'm planning on using MSMQ to receive new objects whenever they have been modified. It's a somewhat complex approach but the goal is to reduce trips to the database and allow instant data communication between Silverlight applications that are connected to the MSMQ. My Silverlight applications are meant to be long-running and the amount of data to be cached will not be large. I'm planning on saving the in-memory cache using local storage. Anyway, in order to process the updated objects that come in, I'd like to know if the user has changed the existing object. Could I use some event relating to data-binding to set a flag indicating that the object has changes? Maybe there's a better way to do the cache entirely? Thanks!

    Read the article

  • Macro keeps crashing need to speed it up or rewrite it, excel vba 50,000 lines of data

    - by Joel
    Trying to speed up a macro that runs over 50,000 lines ! I have two ways of performing the same vba macro Sub deleteCommonValue() Dim aRow, bRow As Long Dim colB_MoreFirst, colB_LessFirst, colB_Second, colC_MoreFirst, colC_LessFirst, colC_Second As Integer Dim colD_First, colD_Second As Integer Application.ScreenUpdating = False Application.DisplayStatusBar = False Application.Calculation = xlCalculationManual Application.EnableEvents = False aRow = 2 bRow = 3 colB_MoreFirst = Range("B" & aRow).Value + 0.05 colB_LessFirst = Range("B" & aRow).Value - 0.05 colB_Second = Range("B" & bRow).Value colC_MoreFirst = Range("C" & aRow).Value + 0.05 colC_LessFirst = Range("C" & aRow).Value - 0.05 colC_Second = Range("C" & bRow).Value colD_First = Range("D" & aRow).Value colD_Second = Range("D" & bRow).Value Do If colB_Second <= colB_MoreFirst And colB_Second >= colB_LessFirst Then If colC_Second <= colC_MoreFirst And colC_Second >= colC_LessFirst Then If colD_Second = colD_First Or colD_Second > colD_First Then Range(bRow & ":" & bRow).Delete 'bRow delete, assign new value to bRow colB_Second = Range("B" & bRow).Value colC_Second = Range("C" & bRow).Value colD_Second = Range("D" & bRow).Value '----------------------------------------------------- Else Range(aRow & ":" & aRow).Delete bRow = aRow + 1 'aRow value deleted, assign new value to aRow and bRow colB_MoreFirst = Range("B" & aRow).Value + 0.05 colB_LessFirst = Range("B" & aRow).Value - 0.05 colB_Second = Range("B" & bRow).Value colC_MoreFirst = Range("C" & aRow).Value + 0.05 colC_LessFirst = Range("C" & aRow).Value - 0.05 colC_Second = Range("C" & bRow).Value colD_First = Range("D" & aRow).Value colD_Second = Range("D" & bRow).Value '----------------------------------------------------- End If Else bRow = bRow + 1 'Assign new value to bRow colB_Second = Range("B" & bRow).Value colC_Second = Range("C" & bRow).Value colD_Second = Range("D" & bRow).Value '----------------------------------------------------- End If Else bRow = bRow + 1 'Assign new value to bRow colB_Second = Range("B" & bRow).Value colC_Second = Range("C" & bRow).Value colD_Second = Range("D" & bRow).Value '----------------------------------------------------- End If If IsEmpty(Range("D" & bRow).Value) = True Then aRow = aRow + 1 bRow = aRow + 1 'finish compare aRow, assign new value to aRow and bRow colB_MoreFirst = Range("B" & aRow).Value + 0.05 colB_LessFirst = Range("B" & aRow).Value - 0.05 colB_Second = Range("B" & bRow).Value colC_MoreFirst = Range("C" & aRow).Value + 0.05 colC_LessFirst = Range("C" & aRow).Value - 0.05 colC_Second = Range("C" & bRow).Value colD_First = Range("D" & aRow).Value colD_Second = Range("D" & bRow).Value '----------------------------------------------------- End If Loop Until IsEmpty(Range("D" & aRow).Value) = True Application.ScreenUpdating = False Application.DisplayStatusBar = False Application.Calculation = xlCalculationAutomatic Application.EnableEvents = False End Sub or Sub deleteCommonValue() Dim aRow, bRow As Long Application.ScreenUpdating = False aRow = 2 bRow = 3 Do If Range("B" & bRow).Value <= (Range("B" & aRow).Value + 0.05) _ And Range("B" & bRow).Value >= (Range("B" & aRow).Value - 0.05) Then If Range("C" & bRow).Value <= (Range("C" & aRow).Value + 0.05) _ And Range("C" & bRow).Value >= (Range("C" & aRow).Value - 0.05) Then If Range("D" & bRow).Value = (Range("D" & aRow).Value) _ Or Range("D" & bRow).Value > (Range("D" & aRow).Value) Then Range(bRow & ":" & bRow).Delete Else Range(aRow & ":" & aRow).Delete bRow = aRow + 1 Range("A" & aRow).Select End If Else bRow = bRow + 1 Range("A" & bRow).Select End If Else bRow = bRow + 1 Range("A" & bRow).Select End If If IsEmpty(Range("D" & bRow).Value) = True Then aRow = aRow + 1 bRow = aRow + 1 End If Loop Until IsEmpty(Range("D" & aRow).Value) = True End Sub I dont know if my best option will be to split the rows into multiple sheets?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >