Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Populating values in cells based on lookup from other cell.

Hi,

I would like to know the approach to automate one of this requirement on
excel sheet.

1. I have a workbook with sheet1 having my master data column A (ID), Column
B (FirstName), Column C (LastName) with around 500 records.
2. I will be using blank sheet2 of same workbook to enter ID's in column A
using a barcode scanner.
3. Based on the value of sheet2 column A i.e. (ID), I would like to run a
lookup of ID value in sheet1 and populate sheet2 column B and column C with
corresponding values from sheet1 for respective ID. i.e. respective First
Name and Last Name.
4. And then punch a timestamp in sheet2 columnD of same record.

I would like to know what's the best way to achieve this automation using
formula or programming any macro on key press events of sheet2 column A
values.

Thanks,
Khozema

2. I need to populate data in column B and C in my sheet 1 based on the
value in colu
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Populating values in cells based on lookup from other cell.

VBA is fine, but you can get the column B and C values to appear using simple
INDEX/MATCH formulas.

I use INDEX/MATCH for this, but you can also use VLOOKUP() or LOOKUP() based
on some other restrictions about the layout of the table you're searching.
INDEX/MATCH has none of those restrictions.

Here's a sample sheet showing exactly what you're looking to do.
https://sites.google.com/a/madrocket...edirects=0&d=1

For #2, you can use a worksheet_change event to watch column A and put a
time stamp in column D when Col A gets a value.

Right-click on the sheet tab for Sheet2 and select VIEW CODE.

Paste in this sheet macro:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A:A")) Is Nothing Then _
Range("D" & Target.Row) = Now
End Sub


Close the editor and save your sheet. Now placing a value in column A will
get you an instant time stamp in D.

--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


"Khozema Sherwala" wrote:

Hi,

I would like to know the approach to automate one of this requirement on
excel sheet.

1. I have a workbook with sheet1 having my master data column A (ID), Column
B (FirstName), Column C (LastName) with around 500 records.
2. I will be using blank sheet2 of same workbook to enter ID's in column A
using a barcode scanner.
3. Based on the value of sheet2 column A i.e. (ID), I would like to run a
lookup of ID value in sheet1 and populate sheet2 column B and column C with
corresponding values from sheet1 for respective ID. i.e. respective First
Name and Last Name.
4. And then punch a timestamp in sheet2 columnD of same record.

I would like to know what's the best way to achieve this automation using
formula or programming any macro on key press events of sheet2 column A
values.

Thanks,
Khozema

2. I need to populate data in column B and C in my sheet 1 based on the
value in colu

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Populating values in cells based on lookup from other cell.

Thanks JBeaucai Your pointer and help was really appreciated. Thanks again
for the sample sheet. Appreciate it.

"JBeaucaire" wrote:

VBA is fine, but you can get the column B and C values to appear using simple
INDEX/MATCH formulas.

I use INDEX/MATCH for this, but you can also use VLOOKUP() or LOOKUP() based
on some other restrictions about the layout of the table you're searching.
INDEX/MATCH has none of those restrictions.

Here's a sample sheet showing exactly what you're looking to do.
https://sites.google.com/a/madrocket...edirects=0&d=1

For #2, you can use a worksheet_change event to watch column A and put a
time stamp in column D when Col A gets a value.

Right-click on the sheet tab for Sheet2 and select VIEW CODE.

Paste in this sheet macro:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A:A")) Is Nothing Then _
Range("D" & Target.Row) = Now
End Sub


Close the editor and save your sheet. Now placing a value in column A will
get you an instant time stamp in D.

--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


"Khozema Sherwala" wrote:

Hi,

I would like to know the approach to automate one of this requirement on
excel sheet.

1. I have a workbook with sheet1 having my master data column A (ID), Column
B (FirstName), Column C (LastName) with around 500 records.
2. I will be using blank sheet2 of same workbook to enter ID's in column A
using a barcode scanner.
3. Based on the value of sheet2 column A i.e. (ID), I would like to run a
lookup of ID value in sheet1 and populate sheet2 column B and column C with
corresponding values from sheet1 for respective ID. i.e. respective First
Name and Last Name.
4. And then punch a timestamp in sheet2 columnD of same record.

I would like to know what's the best way to achieve this automation using
formula or programming any macro on key press events of sheet2 column A
values.

Thanks,
Khozema

2. I need to populate data in column B and C in my sheet 1 based on the
value in colu

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Populating values in cells based on lookup from other cell.

Hi JBeaucaire,

I implemented the first part and its working fine. I also implemented the
suggested second point, but somehow, i do not get any results. I mean value
in D is just blank. Did some debug on macro but finally nothing worked out.
Any suggestion ? Thanks!

Regards,
Khozema


"JBeaucaire" wrote:

VBA is fine, but you can get the column B and C values to appear using simple
INDEX/MATCH formulas.

I use INDEX/MATCH for this, but you can also use VLOOKUP() or LOOKUP() based
on some other restrictions about the layout of the table you're searching.
INDEX/MATCH has none of those restrictions.

Here's a sample sheet showing exactly what you're looking to do.
https://sites.google.com/a/madrocket...edirects=0&d=1

For #2, you can use a worksheet_change event to watch column A and put a
time stamp in column D when Col A gets a value.

Right-click on the sheet tab for Sheet2 and select VIEW CODE.

Paste in this sheet macro:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A:A")) Is Nothing Then _
Range("D" & Target.Row) = Now
End Sub


Close the editor and save your sheet. Now placing a value in column A will
get you an instant time stamp in D.

--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


"Khozema Sherwala" wrote:

Hi,

I would like to know the approach to automate one of this requirement on
excel sheet.

1. I have a workbook with sheet1 having my master data column A (ID), Column
B (FirstName), Column C (LastName) with around 500 records.
2. I will be using blank sheet2 of same workbook to enter ID's in column A
using a barcode scanner.
3. Based on the value of sheet2 column A i.e. (ID), I would like to run a
lookup of ID value in sheet1 and populate sheet2 column B and column C with
corresponding values from sheet1 for respective ID. i.e. respective First
Name and Last Name.
4. And then punch a timestamp in sheet2 columnD of same record.

I would like to know what's the best way to achieve this automation using
formula or programming any macro on key press events of sheet2 column A
values.

Thanks,
Khozema

2. I need to populate data in column B and C in my sheet 1 based on the
value in colu

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Populating values in cells based on lookup from other cell.

You can shoot your sheet to me at

JBeau
AT
madrocketscientist
DOT
com

And I'll take a look for you. That macro must be IN the sheet module for it
to work. If you placed it in a regular module...no dice.

-Jerry
--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


"Khozema Sherwala" wrote:

Hi JBeaucaire,

I implemented the first part and its working fine. I also implemented the
suggested second point, but somehow, i do not get any results. I mean value
in D is just blank. Did some debug on macro but finally nothing worked out.
Any suggestion ? Thanks!

Regards,
Khozema


"JBeaucaire" wrote:

VBA is fine, but you can get the column B and C values to appear using simple
INDEX/MATCH formulas.

I use INDEX/MATCH for this, but you can also use VLOOKUP() or LOOKUP() based
on some other restrictions about the layout of the table you're searching.
INDEX/MATCH has none of those restrictions.

Here's a sample sheet showing exactly what you're looking to do.
https://sites.google.com/a/madrocket...edirects=0&d=1

For #2, you can use a worksheet_change event to watch column A and put a
time stamp in column D when Col A gets a value.

Right-click on the sheet tab for Sheet2 and select VIEW CODE.

Paste in this sheet macro:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A:A")) Is Nothing Then _
Range("D" & Target.Row) = Now
End Sub


Close the editor and save your sheet. Now placing a value in column A will
get you an instant time stamp in D.

--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


"Khozema Sherwala" wrote:

Hi,

I would like to know the approach to automate one of this requirement on
excel sheet.

1. I have a workbook with sheet1 having my master data column A (ID), Column
B (FirstName), Column C (LastName) with around 500 records.
2. I will be using blank sheet2 of same workbook to enter ID's in column A
using a barcode scanner.
3. Based on the value of sheet2 column A i.e. (ID), I would like to run a
lookup of ID value in sheet1 and populate sheet2 column B and column C with
corresponding values from sheet1 for respective ID. i.e. respective First
Name and Last Name.
4. And then punch a timestamp in sheet2 columnD of same record.

I would like to know what's the best way to achieve this automation using
formula or programming any macro on key press events of sheet2 column A
values.

Thanks,
Khozema

2. I need to populate data in column B and C in my sheet 1 based on the
value in colu



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
Populating a cell based on a range of values (Part III) akkrug New Users to Excel 3 June 26th 08 08:28 PM
Populating a Cell based on a Range of Values (Part II) akkrug New Users to Excel 6 June 22nd 08 02:40 PM
Populating a cell based on a range of values akkrug New Users to Excel 2 June 20th 08 03:09 PM
populating a cell based on another range of cells in excel Chris O'Neill Excel Discussion (Misc queries) 2 July 16th 07 10:20 PM
Populating a field based on lookup values Sav_C Excel Worksheet Functions 5 August 6th 06 02:49 AM


All times are GMT +1. The time now is 01:01 PM.

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"