+ Reply to Thread
Results 1 to 4 of 4

Run loop based on the value of the cell in a column

  1. #1
    Registered User
    Join Date
    12-16-2017
    Location
    Reading
    MS-Off Ver
    2010
    Posts
    7

    Run loop based on the value of the cell in a column

    Dear Forum Members,

    I am new or novice to the VBA coding and need some help. I have a table as shown below.
    Column A Column B
    Y java -jar "London" "Rainy" 30c -a
    Y java -jar "NEW YORK" "Dry" 40c -a
    N java -jar "SYDNEY" "Sunny" 10c -a
    N java -jar "MANCHESTER" "Humid" 10c -a
    Y java -jar "AMSTERDAM" "Cloudy" 20c -a

    With the help of people on this and other forums .. I managed to work out how to run the Java command in loop. But at the time of posting the original reqt. I didnt realised whether I can run java command based on the values in Column A? Which means the loop runs through Column A and if it find the flag = 'Y' it will run the java command present in column B.


    The code so far is below:

    Please Login or Register  to view this content.
    Can anybody help?

    Thanks.
    Last edited by chetanojha; 07-05-2018 at 07:04 AM. Reason: Kept wrong details

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Run loop based on the value of the cell in a column

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    12-16-2017
    Location
    Reading
    MS-Off Ver
    2010
    Posts
    7

    Re: Run loop based on the value of the cell in a column

    Brilliant. Thanks a lot. This has resolved my issue.


    Quote Originally Posted by AlphaFrog View Post
    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Run loop based on the value of the cell in a column

    You're welcome. Thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA Loop - Colour Range of Cells in Row Based on Cell Value in Column of Same Row
    By stevoDE in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-25-2017, 04:50 AM
  2. Loop thru column, copy value to different sheet based on value
    By cpyter in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-15-2016, 03:21 PM
  3. Replies: 0
    Last Post: 08-11-2016, 09:28 PM
  4. Delete a column based on a heading cell value and loop
    By hassan88 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-03-2015, 07:42 AM
  5. Loop thru ALL sheets, resizing one column in each based on certain criteria
    By jerrydiaz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-09-2014, 08:54 AM
  6. Code to loop through a column and change cell value based on list
    By davekippen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-13-2011, 04:27 PM
  7. Copy and Paste Loop based on corresponding value in another column
    By gibby8 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-14-2011, 03:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1