LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default INPUT BOX

I use the following code that I found online and modified, to update
data in my various worksheets. I was wondering if anyone knows how to
make it so that when I insert a date into the different columns I can
use an input box instead of always going to the code module.

For example below 13 June 07 will go into the MSA column but not in
ARS. An input box for each is what I am trying to attain without going
into the code module.

example
----------------------------------------------------------------------
'MSA Column
For Each x In Selection
For Each y In CompareRange
If x = y Then x.Offset(0, 2) = ""
Next y
Next x
'ARS Column
For Each x In Selection
For Each y In CompareRange
If x = y Then x.Offset(0, 3) = "13 JUNE 07"
Next y
Next x
----------------------------------------------------------------------

Sub Find_Matches()

Dim CompareRange As Variant, x As Variant, y As Variant
' Set CompareRange equal to the range to which you will
' compare the selection.
Set CompareRange = Workbooks("LookUP1"). _
Worksheets("Sheet1").Range("A3:A41")
'
' Loop through each cell in the selection and compare it to
' each cell in CompareRange.
Application.ScreenUpdating = False
Range("B2").Select
Range(Selection, Selection.End(xlDown)).Select
For Each x In Selection
For Each y In CompareRange
If x = y Then y.Offset(0, 1) = "Matched"
Next y
Next x
'MSA Column
For Each x In Selection
For Each y In CompareRange
If x = y Then x.Offset(0, 2) = ""
Next y
Next x
'ARS Column
For Each x In Selection
For Each y In CompareRange
If x = y Then x.Offset(0, 3) = "13 JUNE 07"
Next y
Next x
'MSA 3 Column
For Each x In Selection
For Each y In CompareRange
If x = y Then x.Offset(0, 4) = ""
Next y
Next x
'Shelf Column
For Each x In Selection
For Each y In CompareRange
If x = y Then x.Offset(0, 5) = ""
Next y
Next x
'Shop Column
For Each x In Selection
For Each y In CompareRange
If x = y Then x.Offset(0, 6) = ""
Next y
Next x
Application.ScreenUpdating = True
End Sub

 
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 to input pictures automatically based on cell input? bsharp Excel Worksheet Functions 9 May 30th 09 07:16 AM
Have user input converted to uppercase in same cell as input? Shannonn New Users to Excel 1 June 20th 06 03:19 AM
How do I add input data in the input ranges in drop down boxes. oil_driller Excel Discussion (Misc queries) 1 November 9th 05 10:31 PM
=SUMIF(Input!H2:H718,AZ19,Input!E2:E685)AND(IF ALex Excel Worksheet Functions 2 March 14th 05 09:19 PM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM


All times are GMT +1. The time now is 10:20 AM.

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"