ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Loop until a condition is False (https://www.excelbanter.com/excel-programming/298645-loop-until-condition-false.html)

matt_steer[_3_]

Loop until a condition is False
 
Data
A1 - 10.01
A2 - 10.02

C1 - Capture Party Details
C2 - Capture Party Details
C3 - Capture Party Details
C4 - Capture Party Details
C5 - View Transaction

-------------------------------------------------------
What i want to do is in activecell 'Cell A3' compare cell C3 to C2. I
they match then put 10.02 into Cell A3. Move to A4. If C4 and C
match then put 10.02 into Cell A4. Move to A5. If C5 and C4 match the
put 10.02 into Cell A5 else if they don't match (and in this case the
don't) insert a new row with the value in A5 to be 20.01.

Make sense?

The row with xx.01 in column A signal a sub heading

--
Message posted from http://www.ExcelForum.com


willy[_2_]

Loop until a condition is False
 
Matt
I'm not sure what the exact code for an IF statement is in VB, but it should go something like this

IF Range("C3").Value = Range("C2").value the
Range("A3").Value = "10.02
IF Range...

I'm sure there is more a dynamic way to do it, but that is the best way i can think of doing for now. Hope it helps
Also, like I said, I'm not sure how exact the code will work, its the idea of it that counts
Will

----- matt_steer wrote: ----

Dat
A1 - 10.0
A2 - 10.0

C1 - Capture Party Detail
C2 - Capture Party Detail
C3 - Capture Party Detail
C4 - Capture Party Detail
C5 - View Transactio

------------------------------------------------------
What i want to do is in activecell 'Cell A3' compare cell C3 to C2. I
they match then put 10.02 into Cell A3. Move to A4. If C4 and C
match then put 10.02 into Cell A4. Move to A5. If C5 and C4 match the
put 10.02 into Cell A5 else if they don't match (and in this case the
don't) insert a new row with the value in A5 to be 20.01

Make sense

The row with xx.01 in column A signal a sub heading


--
Message posted from http://www.ExcelForum.com




All times are GMT +1. The time now is 08:45 AM.

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