• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

coditionally put data if condition met

If Column H is greater than column I then Put in column K BUY
If column H is lower than column I then put in column K SELL
see the sample file
 

Attachments

  • Book1.xlsb
    21.1 KB · Views: 9
Hi:

This is a simple if condition please give a search in Google and find a solution. After posting around 94 messages here I would expect you to at least try to find a solution before blankly asking here only because its a free service.

Thanks
 
I know the formula I tried to make the code but i am new to vba so i was unable to make a code
I know it's a free service, I respect that, U r providing solutions, guiding the beginer's Everything is going 101% perfect
Only the thing is i am not an expert and u r experts so just taking help from u
 
Hi:

This is a basic level VBA, there are hundreds of solutions available on various forums for this. I did not learn excel or VBA in one day, I don't even have an IT background unless you try to figure out solutions on your own you are not going to learn. I am talking from experience.

Thanks
 
i searched for this problem on google but i am getting same but not completely same(means 25% same) so plz look into it and do needful
 

That no needs VBA, just a beginner level formula and
using this formula within a procedure needs only a single codeline
without any loop like yet shown in your previous threads !​
 
If you had studied a few of my previous codes you should have figured this one out.
Code:
Sub belle()
Dim cell As Range
  For Each cell In Sheets("Sheet2").UsedRange.Columns(8).Cells
    If cell.Value > cell.Offset(, 1).Value Then cell.Offset(, 3).Value = "BUY"
    If cell.Value < cell.Offset(, 1).Value Then cell.Offset(, 3).Value = "SELL"
  Next cell
End Sub
What when the values are equal?
 
I have already maken the code to delete the equal data and after that i will run this code Belleke
Thnx Belleke for giving ur precious time and great support to this post
Problem Solved
 
Back
Top