sorry....i dont know what is the problem.....trying to attache a pic ...but i dont know what do you mean by source..............am putting the link of the pic and click insert but i didnt succeed ......here is the link to the picture
Posts by abdi1
-
-
i didnt know how to attache a pic that explain.......sorry i will tray to attache one
-
hi how to fined all matching values in a cell range F12:19 to O12:19 and it's datetime in cells E12:E19 ? can any one guide me to a thread that talk about the same idea? or give me an example in VBA
-
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
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 -
Re: Sum every row with conditions
hi
thanks for ur help
i used ur code but the problem still the same
iv attached an image to show what i need
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 macroCode
Display MoreSub Sum2Numbers () Dim i as Long, x as Long Dim msg as string i = InputBox("Please enter the row number your data starts on in Column E:") ' You'll need to modify above to ensure the input is always a number If i >= Range("E" & Rows.Count).End(xlUp).Row Then msg = "Invalid row number entered" & vbcrlf msg = msg & "Macro will stop, please enter a valid number" Msgbox msg Exit Sub End If For x = i to Range("E" & Rows.Count).End(xlUp).Row Step 2 Range("L" & x + 1) = Range("E" & x) + Range("E" & x + 1) Next x End Sub
could any one help plz -
Re: macro to sum numbers with same signs
Quote from Demgar;519148Option 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;519146No, 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 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() -
Re: macro to sum numbers with same signs
hi
is this macro can be made or need a programming language other than vba? -
Code
Display MoreB C D time data result 12.00 1 12.05 1 12.10 1 3 12.12 - 2 12.25 -1 -3 12.40 1 1 12.55 -1 - 1 1.05 1 1.16 5 6
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