ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help writing a macro (https://www.excelbanter.com/excel-programming/300404-help-writing-macro.html)

alldreams

Help writing a macro
 
HI everyone,

I have very little experience with VBA. Could you help
me get this conditions in an excel macro since I can't
figure out how to use them in a formula?

1.) DAY 1
IF A3 < A5 AND A4 A5,
THEN A6 = A4 - A5 AND A7 = LONG.

IF A3 < A5 and A4 < A5
THEN A6 = A4 - A5 AND A7 = LOSS

IF A3 A5 AND A4 < A5 THEN A7 = NOT LONG

2.) DAY 2
IF A7 = LOSS OR NOT LONG
THEN 1.) for next column B

IF A7 = LONG
THEN IF B4 B5,
THEN B6 = B4-A5 AND A6 = 0 AND B7 = LONG.
IF B4 < B5 THEN B6 = B4-A5 AND A6 = 0 AND B7 = CLOSE
LONG.



This loops until the last nonblank value in row 1.

Thanks in advance.




All times are GMT +1. The time now is 12:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com