Get Information into a form?

eluna

Board Regular
Joined
May 30, 2005
Messages
92
I wonder if this is possible: Get the name of the company, select the dates with numbers higher than 2000 and put this info into a button or form that can be easily move to the right dates? Hope it makes sense.
Compression Calendar.XLS
ABCDEFGHIJKL
1October2006
2SunMonTueWedThuFriSatSunMonTueWed
31234567891011
4AmericanSocietyofPlasticSurgeons-Annual[MosconeApprovedDefinite-MosconeN]0007001,0002,0003,0003,0002,9002,6002,000
5AudioEngineeringSociety,Inc.-Annual[MosconeApprovedDefinite-MosconeS]351054301,0752,6853,3003,3002,8651,29025075
6DirectMarketingAssociation-AnnualConference&Exhibition[MosconeApprovedDefinite-MosconeN&S]000000005050125
7Total351054301,7753,6855,3006,3005,8654,2402,9002,200
8
9SunMonTueWedThuFriSatSunMonTueWed
101234567891011
112,0003,0003,0002,9002,6002,000
121,0752,6853,3003,3002,8651,290
Oct06 (2)
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
eluna,

I do not know what this means: "put this info into a button or form that can be easily move to the right dates"

I can get the information for you.

In your spreadsheet, copy cells 'A1:L3' into 'A17'.

Copy the below code:

'-----------Code Begins Here---------------
Sub SelectDatesWithNumbersGreaterThan2000()
'
' SelectDatesWithNumbersGreaterThan2000 Macro
' Macro created 9/15/2006 by Stanley D. Grom, Jr.
'
'
Dim intWriteRowNumber As Integer
intWriteRowNumber = 20

For Each c In [B4:L4]
If c.Value > 2000 Then
Range("A" & intWriteRowNumber & ":A" & intWriteRowNumber & "").Value = Range("A" & c.Row).Value
Worksheets("Oct06 (2)").Cells(intWriteRowNumber, c.Column) = Worksheets("Oct06 (2)").Cells(c.Row, c.Column)
End If
Next

If Range("A" & intWriteRowNumber & ":A" & intWriteRowNumber & "").Value <> "" Then
intWriteRowNumber = intWriteRowNumber + 1
End If

For Each c In [B5:L5]
If c.Value > 2000 Then
Range("A" & intWriteRowNumber & ":A" & intWriteRowNumber & "").Value = Range("A" & c.Row).Value
Worksheets("Oct06 (2)").Cells(intWriteRowNumber, c.Column) = Worksheets("Oct06 (2)").Cells(c.Row, c.Column)
End If
Next

If Range("A" & intWriteRowNumber & ":A" & intWriteRowNumber & "").Value <> "" Then
intWriteRowNumber = intWriteRowNumber + 1
End If

For Each c In [B6:L6]
If c.Value > 2000 Then
Range("A" & intWriteRowNumber & ":A" & intWriteRowNumber & "").Value = Range("A" & c.Row).Value
Worksheets("Oct06 (2)").Cells(intWriteRowNumber, c.Column) = Worksheets("Oct06 (2)").Cells(c.Row, c.Column)
End If
Next

'
End Sub
'-----------Code Ends Here-----------------


And, paste it into the Microsoft Excel Objets, Sheet1(Oct06 (2)).

Then run the macro 'SelectDatesWithNumbersGreaterThan2000'.


Have a great day,
Stan
 
Upvote 0

Forum statistics

Threads
1,217,751
Messages
6,138,411
Members
450,134
Latest member
TYoung24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top