PC Review


Reply
Thread Tools Rate Thread

Data Fill in VB?

 
 
Carrie_Loos via OfficeKB.com
Guest
Posts: n/a
 
      15th Jan 2008
I have a worksheet with names in the first row and I used a look up formula
to gather data from another sheet that signifies dates (this ties in with the
rest of my workbook and how it behaves so has to remain this way) so
basically I have columns with 1's and 2's in them otherwise blank spaces.

1=begin date and 2=end date. I want to find the 1's in each column and fill
in with a 1 in between the 1 and 2 as well as changing the 2 to a one. What I
need is a string of 1's.

I have looked at a couple of data fill examples and it appears to be the way
to go but I need help with this.

Thanks in advance
Carrie

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200801/1

 
Reply With Quote
 
 
 
 
Dave D-C
Guest
Posts: n/a
 
      16th Jan 2008
A sheet formula solution:
say col A has
Adam
b
b
1
b
b
2
b
b
etc .
where b's are blanks. Then put the following in B2
=IF(OR(MAX(A$2:A2)=1,A2=2),1,"")
and copy down and this will give you your 1's which
you could copy and paste special back to col A.

A VBA macro should be easy. Do you have a start? Dave D-C

"Carrie_Loos via OfficeKB.com" <u34134@uwe> wrote:
>I have a worksheet with names in the first row and I used a look up formula
>to gather data from another sheet that signifies dates (this ties in with the
>rest of my workbook and how it behaves so has to remain this way) so
>basically I have columns with 1's and 2's in them otherwise blank spaces.
>
>1=begin date and 2=end date. I want to find the 1's in each column and fill
>in with a 1 in between the 1 and 2 as well as changing the 2 to a one. What I
>need is a string of 1's.
>
>I have looked at a couple of data fill examples and it appears to be the way
>to go but I need help with this.
>
>Thanks in advance
>Carrie


 
Reply With Quote
 
Carrie_Loos via OfficeKB.com
Guest
Posts: n/a
 
      16th Jan 2008
Great -

I can wirte this in a flash. I have never used the approach of using a
formula to think about and then write the macro......Love to learn new
approaches. Thx


Dave D-C wrote:
>A sheet formula solution:
>say col A has
>Adam
>b
>b
>1
>b
>b
>2
>b
>b
>etc .
>where b's are blanks. Then put the following in B2
>=IF(OR(MAX(A$2:A2)=1,A2=2),1,"")
>and copy down and this will give you your 1's which
>you could copy and paste special back to col A.
>
>A VBA macro should be easy. Do you have a start? Dave D-C
>
>>I have a worksheet with names in the first row and I used a look up formula
>>to gather data from another sheet that signifies dates (this ties in with the

>[quoted text clipped - 10 lines]
>>Thanks in advance
>>Carrie


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200801/1

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically fill in data based on data in another field in the table ChadK Microsoft Access Forms 1 15th Feb 2007 08:20 PM
Re: Link Excel data to Word Form with automatic fill of other data Cindy M. Microsoft Word Document Management 0 19th Jan 2007 10:52 AM
I have a list of data, fill in the gaps. FILL function won't work =?Utf-8?B?VHJpdg==?= Microsoft Excel Misc 1 17th Sep 2005 02:33 PM
Pre-fill form fields with data from a different data source Damian Microsoft Access Forms 0 10th Dec 2003 02:29 PM
Pre-fill form fields with data from a different data source Damian Microsoft Access Forms 0 9th Dec 2003 04:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:29 AM.