Use data from different cell

JLeung

New Member
Joined
Jun 12, 2011
Messages
5
Good day all,

I was directed here from ExcelIsFun from youtube, I have a problem which is the last problem im having at work. If you can help I would be extremely grateful!

Here it is:

Input rows look like this: 1,2,3,E,E,6,7
Current the output table looks like this: 0,0,0,1,1,0,0
(I'm using a lookup-function to count the 'E' values)

However the output rows should look like this: 0,0,0,3,3,0,0

In essence I want the "E" values to be replaced with the previous Columns Value.



Having read up from this forum I found this quote from the following thread

Try

Code:
Columns("A").Find(What:="Game", SearchDirection:=xlPrevious, SearchOrder:=xlByRows, LookIn:=xlValues, lookat:=xlPart).Select

But i'm not sure how the code works so can't make use of it but i suspect it may be along the right lines.

I eagerly await a solution, and am grateful for all the help this forum has provided so far!

Many Thanks

Joe
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Is it possible for the first value to be an E? If so, what should go in the first column?
 
Upvote 0
Good point Mike, the answer is no, there will never be a first value of E and E is the only character value. Thanks for raising this.
 
Upvote 0
Are the numeric values always in ascending order from left to right, or can they be in random order?
 
Upvote 0
Yes they will always accend, its a tool to plot experience levels of staff, and the E denotes that they have been assigned to a diffent team so i would like their current experience levels on the "E team" to be recorded as their experience level justifies... also i am using a "countif" function currently NOT a lookup :rolleyes:
 
Upvote 0
If the input data starts in Row 2 andis in columns A through G, the following formula copied in I2, then across to O2, will give you the output you are looking for:

Code:
=IF(ISNUMBER(A2),0,MAX($A$2:A2))

Copy columns I through O down for each input data row.
 
Upvote 0
thanks Mike that worked exactly how i wanted,

I found another method too, but it relies on there not being more than 4 E values and isnt as elegant

in cell F2

Code:
=IF(F1="E",IF(E1="E",IF(D1="E",IF(C1="E", B1, C1), D1), E1), F1)
Thanks a lot for you're help i'm implementing now :laugh:

Joe
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,740
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top