Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using VB to clear Cells in MS excel

Featured Replies

Hello all,

This is a relatively complex problem to explain, but i'll give it my best shot!

OK... I have the following code:

Public Sub LookUp(s)

Dim vOurResult

Dim lookFor

lookFor = s

With Sheets("DATA").Range("comment")

vOurResult = .Find(What:=lookFor, After:=.Cells(1, 1), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False).Offset(0, 9)

End With

If vOurResult = 0 Then

Exit Sub

' Ends program if no comment present for this customer

Else

MsgBox vOurResult

' Displays messagebox with corresponding comment

End If

End Sub

This basically runs a macro that looks through a hidden datasheet within an excel document which looks to see if any given customer has anything written in their "Comment" column; it it does, then it is displayed.

My spreadsheet has a "Trailer Number" column and if someone enters a customer number adjacent to a particular set of trailer numbers, I need an error message to be displayed telling the user that they cannot use this kind of trailer and when they click "OK" the Customer ID field needs to be automatically wiped.

I'm sorry if this explaination is terrible, please ask me for any extra information you may need!

Thanks in advance,

- Jon

Edited by tech_boy

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.