Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reference an individual row within a Column


Hi guys,

I am trying to make a cell in a column populate when i select the third
option from a drop down box within another field. I have been trying to
use an If statement but with little success. Basically when the user
selects Close from a drop down box the current system time will
populate in the time closed column.

Any help would be greatly appreciated,

Aidan Mullane


--
afmullane
------------------------------------------------------------------------
afmullane's Profile: http://www.excelforum.com/member.php...o&userid=33567
View this thread: http://www.excelforum.com/showthread...hreadid=534314

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reference an individual row within a Column


This is one way to do it. I'm assuming you want the cell to move down a
row each time to keep track? If not, then you can just take out the
Do/Loop and the second If/Then statement.

If cboList.Value = "Close" Then
rCell = 3 'This is the row number
cCell = 7 'This is the column number
Do
If Cells(rCell, cCell).Value < "" Then
rCell = rCell + 1
End If
Loop Until Cells(rCell, cCell).Value = ""
Cells(rCell, cCell).Value = "=Now()"
Cells(rCell, cCell).Activate
ActiveCell.Copy
ActiveCell.PasteSpecial (xlPasteValues)
End If

Where "cboList" is whatever you named your ComboBox.
Hope that helps.

-Ikaabod

afmullane Wrote:
Hi guys,

I am trying to make a cell in a column populate when i select the third
option from a drop down box within another field. I have been trying to
use an If statement but with little success. Basically when the user
selects Close from a drop down box the current system time will
populate in the time closed column.

Any help would be greatly appreciated,

Aidan Mullane



--
Ikaabod
------------------------------------------------------------------------
Ikaabod's Profile: http://www.excelforum.com/member.php...o&userid=33371
View this thread: http://www.excelforum.com/showthread...hreadid=534314

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reference an individual row within a Column


Cheers for that man but it dosn't seem to work. I'm getting an error at
the if statement.

Any more help would be greatly appreciated,

Aidan


--
afmullane
------------------------------------------------------------------------
afmullane's Profile: http://www.excelforum.com/member.php...o&userid=33567
View this thread: http://www.excelforum.com/showthread...hreadid=534314

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reference an individual row within a Column


I assumed by "drop down box" you meant a combobox. Whatever you name
that combobox you will have to change "cboList" to that name.

For example: the default name for a combobox is "ComboBox1" so jus
replace cboList with ComboBox1. The easiest way would be to tur
"Design Mode" on using the Macro Toolbar and then double click th
combobox. Then insert the code between "Private Sub name()" and "En
Sub". It would look like this if the combobox was called "ComboBox1":

Private Sub ComboBox1_Change()
If ComboBox1.Value = "Close" Then
rCell = 3 'This is the row number
cCell = 7 'This is the column number
Do
If Cells(rCell, cCell).Value < "" Then
rCell = rCell + 1
End If
Loop Until Cells(rCell, cCell).Value = ""
Cells(rCell, cCell).Value = "=Now()"
Cells(rCell, cCell).Activate
ActiveCell.Copy
ActiveCell.PasteSpecial (xlPasteValues)
End If
End Sub


afmullane Wrote:
Cheers for that man but it dosn't seem to work. I'm getting an error a
the if statement.

Any more help would be greatly appreciated,

Aida


--
Ikaabo
-----------------------------------------------------------------------
Ikaabod's Profile: http://www.excelforum.com/member.php...fo&userid=3337
View this thread: http://www.excelforum.com/showthread.php?threadid=53431

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reference an individual row within a Column


i'm not quite sure how you have created the combobox but i've simply
created it through a seperate sheet. i'm not sure if i have to create
it another way???


--
afmullane
------------------------------------------------------------------------
afmullane's Profile: http://www.excelforum.com/member.php...o&userid=33567
View this thread: http://www.excelforum.com/showthread...hreadid=534314



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Column Totals For Individual Pages T Tran Excel Worksheet Functions 1 October 16th 08 08:10 PM
Help: reference info from master spreadsheet to individual forms Tia Excel Worksheet Functions 1 March 6th 07 09:41 PM
Calculate and display individual error bars for individual points del Charts and Charting in Excel 1 March 31st 06 04:24 AM
adding individual cells in a column Sheila Excel Worksheet Functions 4 January 30th 06 11:36 PM
How Do I Reference Individual Dropdown Menu Items in VBA? FuadsCurse Excel Programming 3 May 3rd 05 02:41 PM


All times are GMT +1. The time now is 12:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"