Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default If < equal to named list require user to fill out desired columns?

I have a named list of part numbers. I already have conditional
formatting on the cells in column A to test if it is equal to any of
the part numbers in the list. If it is not equal to the list it will
change colors to green signifying that it is adding a new part number
to the database. I would like to require the user to fill out the
next 7 columns and leave the rest to be optional.
I am grateful for any suggestions!

Thanks,
Matt

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default If < equal to named list require user to fill out desired columns

Assuming that the cell containing the active part is the ActiveCell:

'Test for new item
If ActiveCell.Interior.Color = vbGreen Then
ActiveCell.Offset(0, 1) = InputBox("Enter data", "Column B")
ActiveCell.Offset(0, 2) = InputBox("Enter data", "Column C")
ActiveCell.Offset(0, 3) = InputBox("Enter data", "Column D")
ActiveCell.Offset(0, 4) = InputBox("Enter data", "Column E")
ActiveCell.Offset(0, 5) = InputBox("Enter data", "Column F")
ActiveCell.Offset(0, 6) = InputBox("Enter data", "Column G")
ActiveCell.Offset(0, 7) = InputBox("Enter data", "Column H")
End If

This is psuedo code only to give you an idea of how it can be done.

"Matt Pierringer" wrote:

I have a named list of part numbers. I already have conditional
formatting on the cells in column A to test if it is equal to any of
the part numbers in the list. If it is not equal to the list it will
change colors to green signifying that it is adding a new part number
to the database. I would like to require the user to fill out the
next 7 columns and leave the rest to be optional.
I am grateful for any suggestions!

Thanks,
Matt


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default If < equal to named list require user to fill out desired columns

On Mar 5, 8:28 pm, JLGWhiz wrote:
Assuming that the cell containing the active part is the ActiveCell:

'Test for new item
If ActiveCell.Interior.Color = vbGreen Then
ActiveCell.Offset(0, 1) = InputBox("Enter data", "Column B")
ActiveCell.Offset(0, 2) = InputBox("Enter data", "Column C")
ActiveCell.Offset(0, 3) = InputBox("Enter data", "Column D")
ActiveCell.Offset(0, 4) = InputBox("Enter data", "Column E")
ActiveCell.Offset(0, 5) = InputBox("Enter data", "Column F")
ActiveCell.Offset(0, 6) = InputBox("Enter data", "Column G")
ActiveCell.Offset(0, 7) = InputBox("Enter data", "Column H")
End If

This is psuedo code only to give you an idea of how it can be done.

"Matt Pierringer" wrote:
I have a named list of part numbers. I already have conditional
formatting on the cells in column A to test if it is equal to any of
the part numbers in the list. If it is not equal to the list it will
change colors to green signifying that it is adding a new part number
to the database. I would like to require the user to fill out the
next 7 columns and leave the rest to be optional.
I am grateful for any suggestions!


Thanks,
Matt


Well... thanks, but since it is only a conditional formatting that is
setting the color, vb did not recognize it as "vbGreen" which actually
I had to change ".Interior.Color = vbGreen" to ".Font.ColorIndex =
10"(I tested 10 with two other cells with vb to determine that was in
fact the correct color #). I think the problem is that conditional
formatting does not actually set those properties, hence you can not
test for them. Any other ideas?

Thanks,
Matt Pierringer

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
How do I delete the name for a named range i no longer require? Chris Mitchell Excel Worksheet Functions 2 June 23rd 07 12:38 PM
Equal to previous cell and named range KnappH Excel Worksheet Functions 0 March 13th 07 02:28 PM
Count number of times two columns have desired values Gavin Deveau Excel Discussion (Misc queries) 2 June 16th 06 06:29 PM
How do i require a user to enter a data in a field in Excel Fred Excel Programming 1 January 25th 06 06:26 PM
User enters data in popup box - its entered into desired cell ian123[_30_] Excel Programming 1 December 28th 03 03:16 PM


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

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

About Us

"It's about Microsoft Excel"