DragonWood
Board Regular
- Joined
- Oct 17, 2010
- Messages
- 97
I have a few problems I need some help with please.
I have a spread sheet that lists all the values from a couple reports.
The idea is to have the reports automatically be filled in from the values in the list.
What I need to do is go through the list a row at a time and auto-fill the appropriate fields in the form.
The value in Column A determines which form to fill in. So if the value is “B” than it fills in one form with the values from the row.
If the value in Column A is “W” it fills in the other form.
I have a code that searches the list sheet and determines how many rows there are.
What I need to add to it is a way to make it find the row with the B and put the rest of the data from the row into the proper form. I will then direct it to a function that will print that form to a PDF.
Then the code needs to repeat and refill in the form with the next line that has a B in column A so it can be printed too.
I know I need to use a Loop, but I’m not very good at writing them.
The second part of my problem is there are randomly rows that do not have either a B or W on them, but there will be more later.
How do I modify this to skip lines that don’t have anything?
Thanks.
I have a spread sheet that lists all the values from a couple reports.
The idea is to have the reports automatically be filled in from the values in the list.
What I need to do is go through the list a row at a time and auto-fill the appropriate fields in the form.
The value in Column A determines which form to fill in. So if the value is “B” than it fills in one form with the values from the row.
If the value in Column A is “W” it fills in the other form.
I have a code that searches the list sheet and determines how many rows there are.
What I need to add to it is a way to make it find the row with the B and put the rest of the data from the row into the proper form. I will then direct it to a function that will print that form to a PDF.
Then the code needs to repeat and refill in the form with the next line that has a B in column A so it can be printed too.
I know I need to use a Loop, but I’m not very good at writing them.
The second part of my problem is there are randomly rows that do not have either a B or W on them, but there will be more later.
How do I modify this to skip lines that don’t have anything?
Code:
LS = Range("A" & Rows.Count).End(xlUp).Row