snasui.com ยินดีต้อนรับ ยินดีต้อนรับสู่กระดานถามตอบ Excel and VBA และอื่น ๆ ที่เป็นมิตรกับทุกท่าน มีไฟล์แนบมหาศาล ช่วยให้ท่านค้นหาและติดตามศึกษาได้โดยง่าย สมาชิกท่านใดที่ยังไม่ได้ระบุ Version ของ Excel ที่ใช้งานจริง สามารถทำตาม Link นี้เพื่อจะได้รับคำตอบที่ตรงกับ Version ของท่านครับ ระบุ Version ของ Excel
Hi
Dear
I have 5 columns like these
CHARGE CODE 1 CHARGE AMOUNT1 CHARGE CODE 2 CHARGE AMOUNT2 CHARGE CODE 3 CHARGE AMOUNT3
In Column A it should contain 2 ,C contain 7 and E contain 8 but the system is not fixed that columns.in column A it contains 2 and 7 ,C contain contain 8 but it is not like that.
How can I return value by row.i ask for IF function.vlookup won't work well because it returns only first value.
For example
J4 is 2 so from J5 it should return value from column B
K4 is 7 so from K5 should return value ajacent to it.
L4 is 8 from L5 should return value from adjacent to it
and so on
I attached an Excel
Best wishes
You do not have the required permissions to view the files attached to this post.