Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Convert value

Hello! Can someone show how to do this in VBA?

Example.

Range 1 is from A2:D8 . e.g. A2=1

Range 2 is from A10:J1000 . e.g. J1000=1

I want to convert J1000=A2.

I need to convert all the individual cell value of range 2 to the cel
address of range 1 if the value in range 2 is equal to the value i
range 1.

Regards,
Michae

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Convert value

Dim cell as Range, cell1 as Range
for each cell in Range("A10:J1000")
for each cell1 in Range("A2:D8")
if cell = cell1 then
cell.Value = cell1.Address(0,0)
exit for
end if
Next
Next

--
Regards,
Tom Ogilvy


"Michael168 " wrote in message
...
Hello! Can someone show how to do this in VBA?

Example.

Range 1 is from A2:D8 . e.g. A2=1

Range 2 is from A10:J1000 . e.g. J1000=1

I want to convert J1000=A2.

I need to convert all the individual cell value of range 2 to the cell
address of range 1 if the value in range 2 is equal to the value in
range 1.

Regards,
Michael


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Convert value

Hi!Tom,
Sorry I miss out one word if should be equal to address formula so tha
when I change anything cell value in A2:D8 the values in the range
will change accordingly.

e.g. A2=1

J1000=1

J1000= "=A2"

Thanks,
Michael.

Tom Ogilvy wrote:
*Dim cell as Range, cell1 as Range
for each cell in Range("A10:J1000")
for each cell1 in Range("A2:D8")
if cell = cell1 then
cell.Value = cell1.Address(0,0)
exit for
end if
Next
Next

--
Regards,
Tom Ogilvy


"Michael168 " wrote i
message
...
Hello! Can someone show how to do this in VBA?

Example.

Range 1 is from A2:D8 . e.g. A2=1

Range 2 is from A10:J1000 . e.g. J1000=1

I want to convert J1000=A2.

I need to convert all the individual cell value of range 2 to th

cell
address of range 1 if the value in range 2 is equal to the valu

in
range 1.

Regards,
Michael


---
Message posted from http://www.ExcelForum.com/


--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Convert value

Hi!Tom,
Sorry I miss out one word if should be equal to address formula so tha
when I change anything cell value in A2:D8 the values in the range
will change accordingly.

e.g. A2=1

J1000=1

J1000= "=A2"

Thanks,
Michael.

Tom Ogilvy wrote:
*Dim cell as Range, cell1 as Range
for each cell in Range("A10:J1000")
for each cell1 in Range("A2:D8")
if cell = cell1 then
cell.Value = cell1.Address(0,0)
exit for
end if
Next
Next

--
Regards,
Tom Ogilvy


"Michael168 " wrote i
message
...
Hello! Can someone show how to do this in VBA?

Example.

Range 1 is from A2:D8 . e.g. A2=1

Range 2 is from A10:J1000 . e.g. J1000=1

I want to convert J1000=A2.

I need to convert all the individual cell value of range 2 to th

cell
address of range 1 if the value in range 2 is equal to the valu

in
range 1.

Regards,
Michael


---
Message posted from http://www.ExcelForum.com/


--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Convert value

Dim cell as Range, cell1 as Range
for each cell in Range("A10:J1000")
for each cell1 in Range("A2:D8")
if cell = cell1 then
cell.Value = "=" & cell1.Address(0,0)
exit for
end if
Next
Next

--
Regards,
Tom Ogilvy

"Michael168 " wrote in message
...
Hi!Tom,
Sorry I miss out one word if should be equal to address formula so that
when I change anything cell value in A2:D8 the values in the range 2
will change accordingly.

e.g. A2=1

J1000=1

J1000= "=A2"

Thanks,
Michael.

Tom Ogilvy wrote:
*Dim cell as Range, cell1 as Range
for each cell in Range("A10:J1000")
for each cell1 in Range("A2:D8")
if cell = cell1 then
cell.Value = cell1.Address(0,0)
exit for
end if
Next
Next

--
Regards,
Tom Ogilvy


"Michael168 " wrote in
message
...
Hello! Can someone show how to do this in VBA?

Example.

Range 1 is from A2:D8 . e.g. A2=1

Range 2 is from A10:J1000 . e.g. J1000=1

I want to convert J1000=A2.

I need to convert all the individual cell value of range 2 to the

cell
address of range 1 if the value in range 2 is equal to the value

in
range 1.

Regards,
Michael


---
Message posted from http://www.ExcelForum.com/
*



---
Message posted from http://www.ExcelForum.com/



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
can the "convert" function in excel convert to UK gallons? JR Excel Discussion (Misc queries) 2 April 24th 08 04:55 PM
how will i convert 05.01.2007 convert 05.Jan.2007 format? lady_like New Users to Excel 17 February 9th 07 12:43 PM
convert decimal number to time : convert 1,59 (minutes, dec) to m agenda9533 Excel Discussion (Misc queries) 8 January 20th 05 10:24 PM
Convert Time...!convert tenths of a second Pape Excel Discussion (Misc queries) 2 December 16th 04 10:17 AM


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

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"