Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Cell contents check and prompt out message (By using Macro)

Hi all,

Could you know how to use Macro to check the cell contents with specified
"String" and prompt out Message box?

E.g. If the Column B1 = "USA" and Column H1 ="Mexico" , prompt the message
box "USA and Mexico are found".

Thanks,
Tlee


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Cell contents check and prompt out message (By using Macro)

I'm thinking you want something like this

Msgbox(Range("B1") & " and " & range("H1") & " are found.")

This assumes that these ranges are on your active sheet.


"tlee" wrote:

Hi all,

Could you know how to use Macro to check the cell contents with specified
"String" and prompt out Message box?

E.g. If the Column B1 = "USA" and Column H1 ="Mexico" , prompt the message
box "USA and Mexico are found".

Thanks,
Tlee



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Cell contents check and prompt out message (By using Macro)

I've used the examples here

http://www.cpearson.com/excel/vbe.aspx

to get to Modules and Procedures. Try it and if it doesn't work, come back
and post what you have.

HTH,
Barb Reinhardt

"tlee" wrote:

Hi all,

Could you know how to use Macro to check the cell contents with specified
"String" and prompt out Message box?

E.g. If the Column B1 = "USA" and Column H1 ="Mexico" , prompt the message
box "USA and Mexico are found".

Thanks,
Tlee



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Cell contents check and prompt out message (By using Macro)

This was a reply to another post.

"Barb Reinhardt" wrote:

I've used the examples here

http://www.cpearson.com/excel/vbe.aspx

to get to Modules and Procedures. Try it and if it doesn't work, come back
and post what you have.

HTH,
Barb Reinhardt

"tlee" wrote:

Hi all,

Could you know how to use Macro to check the cell contents with specified
"String" and prompt out Message box?

E.g. If the Column B1 = "USA" and Column H1 ="Mexico" , prompt the message
box "USA and Mexico are found".

Thanks,
Tlee



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Cell contents check and prompt out message (By using Macro)

Barb,

Thanks for your help and information.

I would like to use control flow to check the cell "B1" and "H1" such as if
statement. After checked, promot message or continous run the code.

Thanks
Tlee

I'm thinking you want something like this

Msgbox(Range("B1") & " and " & range("H1") & " are found.")

This assumes that these ranges are on your active sheet.


"tlee" wrote:

Hi all,

Could you know how to use Macro to check the cell contents with specified
"String" and prompt out Message box?

E.g. If the Column B1 = "USA" and Column H1 ="Mexico" , prompt the
message
box "USA and Mexico are found".

Thanks,
Tlee





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
Incorpoarting cell contents into a message box Colin Hayes Excel Discussion (Misc queries) 6 June 2nd 11 01:50 PM
vba to check cell contents Steve Excel Discussion (Misc queries) 2 July 29th 09 04:58 PM
check cell contents Jack Excel Programming 3 April 5th 06 12:42 PM
how do i create a macro that would check the contents of cells Jade Excel Discussion (Misc queries) 1 December 31st 05 01:37 AM
how do i create a macro that would check the contents of cells Jade Excel Discussion (Misc queries) 1 December 31st 05 12:48 AM


All times are GMT +1. The time now is 11:50 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"