PC Review


Reply
Thread Tools Rate Thread

Cell Population

 
 
Chiccada
Guest
Posts: n/a
 
      7th Apr 2009
Hi all,

I am currently tring to create a Macro Which populates any cell in Column
B based on what is entered in the adjacent cell in Column C. For example, if
I enter any one of 601, 609, 623 or 631 in Column C, the cell next to it in
Column B returns the word "Fees". Any other number returns nothing.

Thanks in advance for your help.

Regards
 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      7th Apr 2009
Launch VBE using Alt+F11. From the tree view double click 'This Workbook'.
Drop down and get the sheet change event..

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Column = 3 Then
Select Case Target.Value
Case 601, 609, 623 Or 631
Cells(Target.Row, 2) = "Fees"
End Select
End If
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Chiccada" wrote:

> Hi all,
>
> I am currently tring to create a Macro Which populates any cell in Column
> B based on what is entered in the adjacent cell in Column C. For example, if
> I enter any one of 601, 609, 623 or 631 in Column C, the cell next to it in
> Column B returns the word "Fees". Any other number returns nothing.
>
> Thanks in advance for your help.
>
> Regards

 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      7th Apr 2009
Right click your sheet tab, view code and paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 3 Or Target.Cells.Count > 1 Or _
IsEmpty(Target) Then Exit Sub
Select Case Target
Case 601, 609, 623, 631
Target.Offset(, -1) = "Fees"
End Select
End Sub


Mike

"Chiccada" wrote:

> Hi all,
>
> I am currently tring to create a Macro Which populates any cell in Column
> B based on what is entered in the adjacent cell in Column C. For example, if
> I enter any one of 601, 609, 623 or 631 in Column C, the cell next to it in
> Column B returns the word "Fees". Any other number returns nothing.
>
> Thanks in advance for your help.
>
> Regards

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      7th Apr 2009
Oops

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Column = 3 Then
Select Case Target.Value
Case 601, 609, 623, 631
Cells(Target.Row, 2) = "Fees"
End Select
End If
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

> Launch VBE using Alt+F11. From the tree view double click 'This Workbook'.
> Drop down and get the sheet change event..
>
> Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
> If Target.Column = 3 Then
> Select Case Target.Value
> Case 601, 609, 623 Or 631
> Cells(Target.Row, 2) = "Fees"
> End Select
> End If
> End Sub
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Chiccada" wrote:
>
> > Hi all,
> >
> > I am currently tring to create a Macro Which populates any cell in Column
> > B based on what is entered in the adjacent cell in Column C. For example, if
> > I enter any one of 601, 609, 623 or 631 in Column C, the cell next to it in
> > Column B returns the word "Fees". Any other number returns nothing.
> >
> > Thanks in advance for your help.
> >
> > Regards

 
Reply With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      7th Apr 2009
=IF(OR(C1=601,C1=609,C1=623,C1=31),"fees","")
--
Gary''s Student - gsnu200843


"Chiccada" wrote:

> Hi all,
>
> I am currently tring to create a Macro Which populates any cell in Column
> B based on what is entered in the adjacent cell in Column C. For example, if
> I enter any one of 601, 609, 623 or 631 in Column C, the cell next to it in
> Column B returns the word "Fees". Any other number returns nothing.
>
> Thanks in advance for your help.
>
> Regards

 
Reply With Quote
 
Chiccada
Guest
Posts: n/a
 
      7th Apr 2009
Thanks Mike, much appreciated.

Regards,

Rik

"Mike H" wrote:

> Right click your sheet tab, view code and paste this in
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> If Target.Column <> 3 Or Target.Cells.Count > 1 Or _
> IsEmpty(Target) Then Exit Sub
> Select Case Target
> Case 601, 609, 623, 631
> Target.Offset(, -1) = "Fees"
> End Select
> End Sub
>
>
> Mike
>
> "Chiccada" wrote:
>
> > Hi all,
> >
> > I am currently tring to create a Macro Which populates any cell in Column
> > B based on what is entered in the adjacent cell in Column C. For example, if
> > I enter any one of 601, 609, 623 or 631 in Column C, the cell next to it in
> > Column B returns the word "Fees". Any other number returns nothing.
> >
> > Thanks in advance for your help.
> >
> > Regards

 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      7th Apr 2009
Your welcome

"Chiccada" wrote:

> Thanks Mike, much appreciated.
>
> Regards,
>
> Rik
>
> "Mike H" wrote:
>
> > Right click your sheet tab, view code and paste this in
> >
> > Private Sub Worksheet_Change(ByVal Target As Range)
> > If Target.Column <> 3 Or Target.Cells.Count > 1 Or _
> > IsEmpty(Target) Then Exit Sub
> > Select Case Target
> > Case 601, 609, 623, 631
> > Target.Offset(, -1) = "Fees"
> > End Select
> > End Sub
> >
> >
> > Mike
> >
> > "Chiccada" wrote:
> >
> > > Hi all,
> > >
> > > I am currently tring to create a Macro Which populates any cell in Column
> > > B based on what is entered in the adjacent cell in Column C. For example, if
> > > I enter any one of 601, 609, 623 or 631 in Column C, the cell next to it in
> > > Column B returns the word "Fees". Any other number returns nothing.
> > >
> > > Thanks in advance for your help.
> > >
> > > Regards

 
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
cell auto population - why 0 when source cell is empty? David Smithz Microsoft Excel Misc 4 18th Jun 2006 05:35 PM
Automatic Cell Population =?Utf-8?B?RUo=?= Microsoft Excel Programming 7 24th May 2006 01:52 PM
Automatic cell population =?Utf-8?B?TWF6enlNaXJzYQ==?= Microsoft Excel Misc 3 9th Feb 2006 06:15 PM
Automatic Cell population Ali Microsoft Excel Programming 2 4th Aug 2004 01:02 PM
Re: hyperlink - cell population Dave Peterson Microsoft Excel Programming 0 25th Sep 2003 04:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:53 AM.