Posts by abdi1

    Re: delete empty cells & zero value cells


    hi
    thank u all for ur help (stephenR ,Rob Xaos and mkghai)
    the best result was using the macro that mkghai made , i appreciate to hem and thanks very much.
    again thanks for u all

    Re: delete empty cells & zero value cells


    hi....
    sorry for late reply i was facing a problem with my computer

    iv searched the forum (and google befor) for a solution to my problem
    but i didnt find the exact solution
    my problem is that the existence of empty and zero value cells within the data range

    every thread that iv saw is talking about deleting only empty cells, i need also the macro to delet zeros from the data range and copy the data range to column L as i show in the pic that iv attached in my first post.... and also that i can choose which cell the macro will start to work

    any help plz?

    hi
    i have a small problem and need some help plz

    the main data is in cloumn E , within the data i have empty cells and zero values
    as in the example below
    could any one help in a macro that delete the empty and zero values cells and shift the cells up and then the macro copy the result to column i (as in the example,which i made manually)


    thanks


    [Blocked Image: http://up6.up-images.com/up//uploads/images/images-d708a67c5a.jpg]http://uploadpics.a2a.cc"]..[/URL]

    Re: conditional Sum using a macro


    Quote from Ger Plante;522121

    Try this...



    Ger



    hi
    thanks very much for ur help.....now it works :thumbcoo:
    many thanks for u my frind......without ur help it will take a lot of time and calculation from me to do that ............again and agine..........
    thanks

    Re: conditional Sum using a macro


    hi
    thanks for help my frind
    the typo that u talked about is not from me it's from the macro :smile:
    if u look againe at the example and count the empty cell befor the 3 with the 3 the result will be 3 (that the problem with the macro) it will add each 2 cells together even if one of them is empty.......and that what i was talking about :smile:...( so i want the macro to jump over the empty cell and count the real numbers together).. i want some help to overcome this problem........by the way iv used ur last code....but may be because am new in VBA
    i didnt' know how to use it correctly.....could u pls merge the tow codes(ur code and my code) together and used it on an example like my example...........
    thanks

    hi
    i have data in excel sheet

    A.... B....C... D.... E.... L
    1 2.... 6... 8.....5......1
    2 2.....3....4......8......8....7
    3 4.....4....5...... 4.....-7
    4 5.... 6....5...... 5......7....0
    5 5.....8....6........5......4..
    6 5......3....8.......5......4.... 8

    i have a macro that work as follow:
    to add every tow numbers(in column E) together and put the result in column L (i did that manually in this example)
    .
    the first cell to start calculation is not the same every time(its not E1)
    and the last cell of calculation is the end of data on column E
    the problem with the macro is
    some times i have a zero value(or emptiy cell ) in column E
    so when i used the macro....it will add the zero value to the privious number.....
    i want the macro to skep the zero value(or the empty cell) and add the next true value.

    imagen that in my example in cell E2 we have no value..so i want the macro to skep that cell and add the next cell value to cell E1 value
    so the result will be -6

    the macro




    could any one help plz

    Re: macro to sum numbers with same signs


    Quote from Demgar;519148

    Option explicit is declared above the first procedure in a module and is a good idea to leave in, it forces you to declare your variables and helps prevent spelling errors.

    For speed, try it with the changes I made in bold.



    thanks very much...it work better
    thank for u ,for Junho and 4 Ruddles

    Re: macro to sum numbers with same signs


    Quote from Ruddles;519146

    No, the macro should start with Option Explicit!

    But why a macro? Can't you just put the formula IF(C2>=0,C2,"") into D2, etc?

    Or did I misunderstand?



    hi...thanks for ur post.
    i have a data come from another sheet in auto refresh
    and every 1 minute..a new data come....so i cant every time drage the cell of formula to calculate the result
    macro is better.....
    again thanks

    Re: macro to sum numbers with same signs


    Quote from junho lee;519135

    Hi abdi1,
    Nice to meet you.
    This works to me.

    Code
    Option Explicit
    Sub SumSameSignBlock()


    Regards, Junho



    hi junho......thanks for u very much..it work good..but it take a few seconds to do it's work.....and during that
    the excel sheet freeze...my pc is 2G ram....so.could u find a solution to this problem?
    and about the first line of the macro...(Option Explicit).....should i keep it?
    i removed it from the code because as i know the macro code should start with sub name()



    hi
    can any body help in making a macro that sum the same signs numbers in column C and put the results in in column D as in the examples above
    and every time that i start the macro ....it will start to calculate from the first cell D2
    and go down
    hope to find this macro