Re: $$Excel-Macros$$ get data from list and display it in msgbox

2012-01-05 Thread NOORAIN ANSARI
Good Solution Don

On Thu, Jan 5, 2012 at 8:00 PM, dguillett1  wrote:

> Another way, using FIND, or use application.vlookup
>
> Sub GetData()
> Dim mv As Range
> mv = InputBox("Please enter a value")
> If mv = "" Then Exit Sub
> Set mf = Columns(1).Find(What:=mv, LookIn:=xlValues, _
>  LookAt:=xlWhole, SearchOrder:=xlByRows, _
>  SearchDirection:=xlNext, _
>  MatchCase:=False, SearchFormat:=False)
> If Not mf Is Nothing Then MsgBox mv & " is " & mf.Offset(, 1)
> End Sub
>
>
> Don Guillett
> SalesAid Software
> dguille...@gmail.com
> -Original Message- From: Seba
> Sent: Thursday, January 05, 2012 6:55 AM
> To: MS EXCEL AND VBA MACROS
> Subject: $$Excel-Macros$$ get data from list and display it in msgbox
>
>
> Hi,
>
> I need help with the getting the data from a list and display it in a
> msgbox. I don't wan't to do this via the ususal lookup functions in
> excel, because I'd like to avoid moving around the worksheet too much.
> Would it be possible to get a macro to do the following:
>
> 1. Open a inputbox to enter the search value A.
> 2. Lookup this value in the list on another worksheet in the same
> workbook.
> 3. Display the value pair in the next column in the msgbox.
>
> --**-
> Example:
>
> Column A Column B
>
> Sistem User
> --**-
>
> So, I would like to enter the sistem in the inputbox and get the
> corresponding user back in the msgbox.
>
> Thank you for your help.
> regards,
> seba
>
> --
> FORUM RULES (986+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5)  Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE  : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
> --**--**
> --**
> To post to this group, send email to excel-macros@googlegroups.com
> --
> FORUM RULES (986+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5)  Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
> NOTE  : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
> --**--**
> --**
> To post to this group, send email to excel-macros@googlegroups.com
>



-- 
Thanks & regards,
Noorain Ansari
 *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/>
*http://noorain-ansari.blogspot.com/* <http://noorain-ansari.blogspot.com/>

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ get data from list and display it in msgbox

2012-01-05 Thread dguillett1

Another way, using FIND, or use application.vlookup

Sub GetData()
Dim mv As Range
mv = InputBox("Please enter a value")
If mv = "" Then Exit Sub
Set mf = Columns(1).Find(What:=mv, LookIn:=xlValues, _
  LookAt:=xlWhole, SearchOrder:=xlByRows, _
  SearchDirection:=xlNext, _
  MatchCase:=False, SearchFormat:=False)
If Not mf Is Nothing Then MsgBox mv & " is " & mf.Offset(, 1)
End Sub


Don Guillett
SalesAid Software
dguille...@gmail.com
-Original Message- 
From: Seba

Sent: Thursday, January 05, 2012 6:55 AM
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ get data from list and display it in msgbox

Hi,

I need help with the getting the data from a list and display it in a
msgbox. I don't wan't to do this via the ususal lookup functions in
excel, because I'd like to avoid moving around the worksheet too much.
Would it be possible to get a macro to do the following:

1. Open a inputbox to enter the search value A.
2. Lookup this value in the list on another worksheet in the same
workbook.
3. Display the value pair in the next column in the msgbox.

---
Example:

Column A Column B

Sistem User
---

So, I would like to enter the sistem in the inputbox and get the
corresponding user back in the msgbox.

Thank you for your help.
regards,
seba

--
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please 
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will 
not get quick attention or may not be answered.


2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security 
measure.


4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited.


NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.


--
To post to this group, send email to excel-macros@googlegroups.com 


--
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 


NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


RE: $$Excel-Macros$$ get data from list and display it in msgbox

2012-01-05 Thread Rajan_Verma
Use this For Vertical List

If you list is Horizontal then use Application.Transpose twice.

 

Sub GetDataFromList()

Dim rngList As Range

Dim strResult As String

Set rngList = Application.InputBox("Please select any Range", , , , , ,
, 8)

strResult = Join(Application.Transpose(rngList), vbNewLine)

MsgBox strResult

End Sub

 

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of NOORAIN ANSARI
Sent: Jan/Thu/2012 06:38
To: excel-macros@googlegroups.com
Subject: Re: $$Excel-Macros$$ get data from list and display it in msgbox

 

Dear Seba,

Please see attached sheet, Hope it will help you
otherwise pls share your workbook with group.



On Thu, Jan 5, 2012 at 6:25 PM, Seba  wrote:

Hi,

I need help with the getting the data from a list and display it in a
msgbox. I don't wan't to do this via the ususal lookup functions in
excel, because I'd like to avoid moving around the worksheet too much.
Would it be possible to get a macro to do the following:

1. Open a inputbox to enter the search value A.
2. Lookup this value in the list on another worksheet in the same
workbook.
3. Display the value pair in the next column in the msgbox.

---
Example:

Column A Column B

Sistem User
---

So, I would like to enter the sistem in the inputbox and get the
corresponding user back in the msgbox.

Thank you for your help.
regards,
seba

--
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security
measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.


--
To post to this group, send email to excel-macros@googlegroups.com




-- 

Thanks & regards,

Noorain Ansari

 <http://excelmacroworld.blogspot.com/> http://excelmacroworld.blogspot.com/

 <http://noorain-ansari.blogspot.com/> http://noorain-ansari.blogspot.com/

 

-- 
FORUM RULES (986+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security
measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
 

--
To post to this group, send email to excel-macros@googlegroups.com

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ get data from list and display it in msgbox

2012-01-05 Thread Seba
I can't thank you enough:)
It works like a charm!

best regards,
seba

On 5 jan., 14:07, NOORAIN ANSARI  wrote:
> Dear Seba,
>
> Please see attached sheet, Hope it will help you
> otherwise pls share your workbook with group.
>
>
>
>
>
>
>
>
>
> On Thu, Jan 5, 2012 at 6:25 PM, Seba  wrote:
> > Hi,
>
> > I need help with the getting the data from a list and display it in a
> > msgbox. I don't wan't to do this via the ususal lookup functions in
> > excel, because I'd like to avoid moving around the worksheet too much.
> > Would it be possible to get a macro to do the following:
>
> > 1. Open a inputbox to enter the search value A.
> > 2. Lookup this value in the list on another worksheet in the same
> > workbook.
> > 3. Display the value pair in the next column in the msgbox.
>
> > ---
> > Example:
>
> > Column A     Column B
>
> > Sistem         User
> > ---
>
> > So, I would like to enter the sistem in the inputbox and get the
> > corresponding user back in the msgbox.
>
> > Thank you for your help.
> > regards,
> > seba
>
> > --
> > FORUM RULES (986+ members already BANNED for violation)
>
> > 1) Use concise, accurate thread titles. Poor thread titles, like Please
> > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> > will not get quick attention or may not be answered.
>
> > 2) Don't post a question in the thread of another member.
>
> > 3) Don't post questions regarding breaking or bypassing any security
> > measure.
>
> > 4) Acknowledge the responses you receive, good or bad.
>
> > 5)  Cross-promotion of, or links to, forums competitive to this forum in
> > signatures are prohibited.
>
> > NOTE  : Don't ever post personal or confidential data in a workbook. Forum
> > owners and members are not responsible for any loss.
>
> > --
> > To post to this group, send email to excel-macros@googlegroups.com
>
> --
> Thanks & regards,
> Noorain Ansari
>  *http://excelmacroworld.blogspot.com/*
> *http://noorain-ansari.blogspot.com/*
>
>  Sample(Seba).xlsm
> 25 1KPrikažiPrenesi

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ get data from list and display it in msgbox

2012-01-05 Thread NOORAIN ANSARI
Dear Seba,

Please see attached sheet, Hope it will help you
otherwise pls share your workbook with group.


On Thu, Jan 5, 2012 at 6:25 PM, Seba  wrote:

> Hi,
>
> I need help with the getting the data from a list and display it in a
> msgbox. I don't wan't to do this via the ususal lookup functions in
> excel, because I'd like to avoid moving around the worksheet too much.
> Would it be possible to get a macro to do the following:
>
> 1. Open a inputbox to enter the search value A.
> 2. Lookup this value in the list on another worksheet in the same
> workbook.
> 3. Display the value pair in the next column in the msgbox.
>
> ---
> Example:
>
> Column A Column B
>
> Sistem User
> ---
>
> So, I would like to enter the sistem in the inputbox and get the
> corresponding user back in the msgbox.
>
> Thank you for your help.
> regards,
> seba
>
> --
> FORUM RULES (986+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5)  Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE  : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> --
> To post to this group, send email to excel-macros@googlegroups.com
>



-- 
Thanks & regards,
Noorain Ansari
 *http://excelmacroworld.blogspot.com/*
*http://noorain-ansari.blogspot.com/* 

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Sample(Seba).xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12


$$Excel-Macros$$ get data from list and display it in msgbox

2012-01-05 Thread Seba
Hi,

I need help with the getting the data from a list and display it in a
msgbox. I don't wan't to do this via the ususal lookup functions in
excel, because I'd like to avoid moving around the worksheet too much.
Would it be possible to get a macro to do the following:

1. Open a inputbox to enter the search value A.
2. Lookup this value in the list on another worksheet in the same
workbook.
3. Display the value pair in the next column in the msgbox.

---
Example:

Column A Column B

Sistem User
---

So, I would like to enter the sistem in the inputbox and get the
corresponding user back in the msgbox.

Thank you for your help.
regards,
seba

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com