Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Fill down until # in Column equals 0 1

Status
Not open for further replies.

useractive

Programmer
Jun 21, 2001
98
US
Another brain teaser, but probably not for this crowd. I'm trying to get a macro or script to click on A3 - highlight over to C3 and fill down. That's the easier part. The trick I'm trying to do is that when A3 becomes the number 0, I want it to stop doing the fill down. If it's possible, I'd like it to then place in another row from another spreadsheet that is a constant row that never changes (row 200) which is totals. Confusing?

Finish project to look something like this...

Column A Colum B Column C
1 3299999 3123456789012
1 3299999 3123467890000
1 3299999 3123478900000
(let's say here is where it would hit Zero in Column A and place line 200 from another sheet in here)
3299999T 3123499999999

Any scripting ideas on this one? I'm trying to make this as user friendly for my people as I can. Thanks for any thoughts on this one.
 
this sounds like fun.

What do you mean by when A3 becomes 0?

Can you provide me an example of what it initial looks like?

Ken
 
Hi Ken,

Yea, I figured some might like this one. I wish VBS was my thing.

See, (will call the main sheet (cleanup) and the sheet where info is stored (dirty)) what the cleanup sheet is initially doing when it's filling down is it's pulling from another column on the dirty sheet. So on dirty sheet, there is a column that has 1 if there is certain data on there and a zero once the fields don't contain the right data. What I'd like to happen (if possible) is when the filling down starts, it looks over, sees the 1 in the column and pulls that data down, then continues filling down until it comes to a zero on the dirty sheet. Then when that process stops, it then goes down and grabs line 200 (cells B200, C200) and pulls them over to B&C(whatever line after it stopped filling down).

If that doesn't make since, I can shoot over an excel sheet kinda showing what I'm trying. Just let me know the email address.

Thanks again for your thoughts on this one.

Swish
 
I think I understand what you want, but I have to leave work soon. If you wanna shoot over the file, I'll work on it tonight and I'll make sure you get what you want.

here's me email.

kenphu@yahoo.com

If the file is too large send to this email instead

kennethp@webmpt.com

 
I just sent you the email to the yahoo account. It's called test.xls.

Thanks again for your help.

Swish
 
Thanks Ken for all of your hard work on this one. I really appreciate it. The script is awesome.

Thanks again,
Swish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top